Freeing Disk Space on a Windows XP Home Edition System

I was running very low on free disk space on a laptop running Windows XP Home Edition Service Pack 3, i.e. Microsoft Windows Version 5.1 (Build 2600.xpsp_sp3_ddr.080814-1236 : Service Pack 3). Windows showed the capacity of the hard disk drive to be 74.5 GB with only 8.31 GB free.

Under the C:\WINDOWS directory, I saw that the $NtServicePackUninstall$ 1 directory was consuming 313 MB (you need to have Windows configured to "show hidden files and folders" to see this directory, if you have installed service pack upgrades on the system.

I right-clicked on the $NtServicePackUninstall$ directory and, while holding down the Shift key to ensure the folder wouldn't go into the Recycle Bin, but, instead would be permanently removed, selected Delete. When asked to confirm the deletion of an exe file I chose "Yes to All" to avoid further prompts for the removal of executable files in the directory.

Beneath the C:\WINDOWS directory, I also saw the following directories:

$NtServicePackUninstallIDNMitigationAPIs$
$NtServicePackUninstallNLSDownlevelMapping$

They were each 579 KB in size. These directories are added when Internet Explorer (IE) 7 is installed 2, 3. It is safe to delete those as well, but it won't be possible to uninstall IE 7 then. I deleted those directories.

I then went to "Add or Remove Programs" (Click on Start, select Control Panel, then select Add or Remove Programs) and selected Windows XP Service Pack 3 by clicking on it. I then clicked on the Remove button. At this point, since I had already deleted the uninstall files, I'm only removing the entry for Windows XP Service Pack 3 from "Add or Remove Programs". I then received an Uninstaller Error message stating "An error occurred while trying to remove Windows XP Service Pack 3. It may have already been uninstalled. Would you like to remove Windows XP Service Pack 3 from the Add or Remove programs list?" Since that was exactly what I wanted at this point, I clicked on Yes. There was no "Add or Remove Programs" entry for Internet Explorer 7, possibly because I installed Service Pack 3 after it was installed.

There were also a lot of directories within C:\WINDOWS with names such as $NtUninstallKBxxxxxx$ where xxxxxx was a sequence of 6 digits. There were also some of the form $NtUninstallKBxxxxxx_y$ or $NtUninstallKBxxxxxx-y$, where y could be a single digit or something like v2_0.

Those directories are created when hotfixes, aka patches, are installed for Microsoft Windows. Those can consume a fair amount of space as well. On this system there were 164 such directories and they were consuming 279 MB of disk space.

I could have just deleted all of those directories and then taken the same steps as above to remove the associated entries under "Add or Remove Programs", but I didn't want to have to manually remove the entries from "Add or Remove Programs", even though there were only a fraction of those entries under "Add or Remove Programs", likely because most of those hotfixes were installed prior to the installation of Service Pack 3. So I used the Remove Hotfix Backups 4 utility created by Doug Knox. I found that it only removed 34 of them, though, leaving 130 remaining, occupying 237 MB of disk space. Perhaps it didn't see the others because they were installed prior to Service Pack 3. I manually deleted those

I also deleted the $MSI31Uninstall_KB893803v2$ directory beneath C:\WINDOWS, which I believe was likely associated with Windows Installer 3.15

I then used Windows XP Search feature (click on Start then Search) to search for all files on the hard disk over 15000 KB in size. I searched on *.*, i.e. all file names, and I also selcted the option to include hidden and system files.

There was a 1.22 GB drwtsn32.log 6 file in C:\Documents and Settings\All Users\Application Data\Microsoft\Dr Watson. That file didn't show up until I performed the search with the option to include hidden and system files selected. It contained information for program crashes going back to May 11, 2008. I didn't need it to do any debugging on the system, so I deleted it. Other files in the C:\Documents and Settings\All Users\Application Data\Microsoft\Dr Watson, such as user.dmp can be deleted as well. The files in this folder are created when system failures occur, and they can be used to determine the cause of a failure7. They can be safely deleted.

You can also safely delete any files in the %Windir%\minidump directory, e.g. C:\WINDOWS\Minidump (you can determine the value of %windir% using the command echo %windir% at a command prompt. The minidump files in this directory are created when Windows stops responding or crashes7. They can assist in determining what caused the crash, if you understand how to interpret their contents.

You can also delete the %SystemRoot%\MEMORY.dmp file, if one exists. %SystemRoot% is likely C:\WINDOWS; you can determine its value by issuing the command echo %systemroot at a command prompt. MEMORY.dmp is the complete memory dump file that is created when Windows stops responding or crashes 7 .

You can also safely delete all of the following files in %windir% (typically C:\Windows on an XP system) directory7.

I also deleted a lot of .tmp files from the C:\WINDOWS\Temp directory. I also deleted .tmp files from C:\Documents and Settings\<username>\Local Settings\Temp directories, where <username> equates to accounts on the system

I noticed that C:\MSOCache, which is a hidden directory, was consuming 290 MB. Since the MSOCache is created by Microsoft Office to hold installation files that can be used when you repair Office or install patches for it 8, I decided not to delete it. The system has Microsoft Office 2003 on it.

I considered deleting the C:\WINDOWS\ServicePackFiles directory, since it was consuming 464 MB of disk space, but decided against it, since Windows will use files from that directory, if it needs to install or repair an operating system file, or you install a new device requiring files from the ServicePackFiles directory. If it can't find the files it needs there, it will prompt you to insert a CD with the Service Pack files it needs 9. Your original Windows CD may not have any Service Pack updates on it, or at least not the current version installed on the hard disk. Instead of deleting it, I compressed the folder by right-clicking on it, choosing Properties, clicking on the Advanced button, then selecting "Compress contents to save disk space", then clicking on OK. When prompted as to whether I wanted to apply the change to the subfolders within the folder, I chose to "apply changes to this folder, subfolders and files." Be prepared to wait a few minutes for the compression process to be completed. The compression reduced the size it was occupying on disk down to 321 MB.

I ran the Disk Cleanup utility that comes with Windows XP to look for additional ways to free disk space (see Freeing Disk Space). After it completed its check of the system, I clicked on the More Options to see additional options for reclaiming disk space.

Disk Cleanup - More Options

I clicked on the Clean up button for System Restore. I was then asked "Are you sure you want to delete all but the most recent restore point?" I chose "Yes". That freed about another 1.4 GB of disk space.

References:

  1. Save Space After Installing Updates
    Dan-De-Mar with Jupiter Jones
  2. What is a $NT......... file (highlighted in blue) ?
    By: Ramesh, MS-MVP
    Date: January 29, 2007
    Aussie Phorums
  3. What's Safe to Delete to Free Up Space on C: Drive?
    By: JS
    Date: September 14, 2008
    WUGNET Forums
  4. Freeing Disk Space
    Date: March 21, 2006
    MoonPoint Support
  5. Re: CAN I DELETE FOLDER C:\WINDOWS\$MSI31Uninstall_KB893803v2$
    By: Shenan Stanley
    Date: December 26, 2005
    Tech-Archive.net: The source for usenet news
  6. Break down of the Dr. Watson log file
    By: Jim Wells MBA
    Date: February 20, 2004
    TechReplublic Articles
  7. How to reclaim disk space on a Windows XP-based computer that has a hard disk capacity of 4 GB or less
    Article ID: 956324
    Last Review: September 5, 2008 - Revision: 1.1
    Microsoft Help and Support
  8. What's "Msocache"?
    By: Leo Notenboom
    Ask Leo - Tech Questions? Get Answers! - Ask Leo!
  9. Can I remove the "ServicePackFiles" folder from my Windows folder?
    By: Leo Notenboom
    Ask Leo - Tech Questions? Get Answers! - Ask Leo!
  10. How to remove Windows Update (Hotfix) backup files manually
    Alvian's home page
  11. Freeing Disk Space
    MoonPoint Support

Valid HTML 4.01 Transitional

Created: February 21, 2009