Win2k3: What files can be deleted from the System drive, and what tool to delete them?

The strategic question is "How do I maximize free space on the System drive," and includes such things as disk compression, changing the TEMP environment variable, removing the hibernation file, minimizing the swap file, buying a larger drive, etc. This is the tactical question about what files can be removed safely, and whether to remove them with a file system command or by changing a retention-setting somewhere.

For example, C:/WINDOWS/Installer on of my machines is 1.5G, and the newest files in there are fifty days old. Total free space on that C: drive is 3G. Is the proper approach to burn them to optical disk just-in-case, then delete them from the command line, or is there some Registry setting that will let Win2k3 do something more sophisticated? Or is that 1.5G of precious, precious treasure?

Edit: The issue is particularly acute for virtual machines, where there will be system snapshots in multiple configurations. An 8G disk is (initially) amply sufficient to run Win2K3, Visual Studio, SQL Server, and the application being developed, but over time cruft from old patches consumes enough resources to prevent new patches from being applied.


Please do not remove the contents of %SYSTEMROOT%\Installer. If you do that, then in the best case you'll be unable to uninstall and/or repair any program installed from a Windows Installer database, and in the worst case all Windows Installer-serviced programs that have advertised autorepair capability will stop working (or at least annoy you every other minute with "Windows Installer is configuring program blahblah" dialog boxes while suspending program execution.)

There is no safe automated way to clena up a drive. Once you delete the obvious (%TEMP%, %SYSTEMROOT%\Temp, %SYSTEMROOT%\SoftwareDistribution\Download) all that's left is uninstalling unused stuff and compressing rarely used stuff.

You might also want to delete the (hidden+system) folders under %SYSTEMROOT% that hold the hotfix / Windows Update patch uninstall backups, unless you plan to uninstall windows hotfixes.


YMMV. When I really need to make room, I'll go to C:\WINDOWS and delete all directories that are many months old named like:

$NtUninstallKB887742$

I figure if a hotfix has been installed for months, and I have installed enough subsequent hotfixes, then I am unlike to ever want to (or even be able to) uninstall the hotfix in question.

The risk from doing this is that you are guaranteed to not be able to uninstall the hotfix in question after removing this directory. However, if a hotfix causes a problem, you should usually know pretty quickly. I have so far never heard of someone discovering months after the fact that a Microsoft hotfix caused a big problem.

With the size of modern hard drives, assuming we're talking about a modern computer, I wouldn't worry about little stuff like a Gig or two total. Not unless you have a fantastic need to make space just before replacing the whole hard drive with a much bigger one. If you are so tight on space that freeing up one Gig will make a big difference, then you are only delaying the inevitable by doing so.

To free up space, right click on My Computer and select "Properties" Go to the System Restore tab. Select a drive and then click "Settings..." You can tune down the percentage of the disk that System Restore will use.

You don't need to have a page file on every disk. In the same "Properties" window of "My Computer," go to Advanced and click "Settings" in the "Performance" box. Then in the pop-up, go to the "Advanced" tab. The bottom box is "Virtual Memory"... click "Change." You can control where you have paging files and their size. I typically only have a paging file on one partition.