Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

up vote 7 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

My knee-jerk answer would be -- in your case, at least -- to buy a larger hard drive. Hard drives are cheap and the tools exist to easily migrate your system/data to a larger hard drive.

Having said that, deleting "unneeded" files is often a matter of system performance/maintenance issues. Unless you know exactly what you are doing, I would recommend using a third-party tool to "clean" your harddrive (something of the ilk of, say, CCleaner). And always keep good backups for those times you screw things up.

Enjoy,

Robert C. Cartaino

share|improve this answer
    
I added "buy a larger hard drive" to the list of alternative tactics for maximizing disk space. –  Thomas L Holaday May 4 '09 at 17:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.