Problem solve Get help with specific problems with your technologies, process and projects.

Free up disk space on your C: drive

Do you have a Windows PC with a system disk that is nearing capacity? Or do you just want to reclaim some disk space? These tips may help you to free up space.

Do you have a Windows PC with a system disk that is nearing capacity? Or do you just want to reclaim some disk space on your C drive? If so, the tips below will help you to free up disk space on your busy hard drive.

(Note: Before performing any of the following tasks, do a full system backup. In addition, set Windows Explorer to "show hidden files and folders.")

Tip #1: Perform a basic cleanup.
Tip #2: Remove disk space hogs
Tip #3: Clean up Service Pack and Windows Fix/Patch installations.
Tip #4: Consider "extreme cleaning." 
Tip #5: Clean out your recycle bin.

Let's look at the first three tasks in more detail.

Basic cleanup of a hard drive

A basic cleanup consists of two tasks: deleting the contents of your Temp directories and deleting your C:\Windows\Downloaded Program Files. Both tasks can be performed using Disk Cleanup.

Some programs store temporary information in a Temp folder. Such folders are usually safe to delete. Examples of Temp folders include:

  • C:\Documents and Settings\your username\Local Settings\Temp
  • C:\Documents and Settings\Default User\Local Settings\Temp
  • C:\Documents and Settings\LocalService\Local Settings\Temp
  • C:\Documents and Settings\your username\Local Settings\Temporary Internet Files
  • C:\Documents and Settings\Default User\Local Settings\Temporary Internet Files
  • C:\Documents and Settings\LocalService\Local Settings\Temporary Internet Files
  • C:\Documents and Settings\your username\Local Settings\History
  • C:\Documents and Settings\Default User\Local Settings\History
  • C:\Documents and Settings\LocalService\Local Settings\History

The contents of the C:\Windows\Downloaded Program Files folder are ActiveX controls and Java applets downloaded automatically from the Internet when you view certain pages. Feel free to delete them.

Removing disk space hogs from your hard drive

Disk space hogs include the pagefile, the hibernation file, the i386 folder and system restore points. Here's how to remove each one.

You can move pagefile.sys to another disk drive. Your computer most likely uses a pagefile (aka virtual memory or swap file). Windows automatically sets the pagefile to start at 1.5x the size of physical memory, and expand up to 3x physical memory if necessary. Getting it off of your system drive can normally save you at least 128 MB. To do this:

  1. Control Panel | System | Advanced tab | Performance | Settings | Advanced tab. Under Virtual Memory, click Change.
  2. Highlight the C: drive and set it to No Paging File (if you intend to move pagefile.sys to another drive).
  3. Click Set. You'll get a warning about not getting a Stop message, but unless you're having issues with Blue Screens, it's safe to choose OK.
  4. Select another drive and put a pagefile on it (or else your system will be running without one. . .which is not recommended for most systems). If you cannot move the file, you can always reduce its size from the recommendations set by Microsoft. But that's not always a good idea; doing so could cause errors such as "Your system is low on virtual memory" or "Your system is running without a properly sized paging file."

The hibernation file C:\HIBERFIL.SYS (hidden, as big as the main memory) is created by the hibernation option. This option, which is normally only found on laptops, lets you hibernate your computer. To find the option, click Control Panel, then Power Optilons, then tab Hibernate.

When your computer hibernates, it stores the main memory into the hiberfil.sys file on your C:\ partition before it shuts down. When you turn your computer back on, it returns to its previous state by reloading the main memory with the information in the hiberfil.sys. To turn off this disk-consuming option, disable the Enable hibernation option on this tab. After a reboot, the hiberfil.sys file will have disappeared.

Feel free to delete the C:\I386 folder (assuming it's present), since it is only used as a convenient place to access installation files. Note: Do not confuse this folder with C:\Windows\ServicePackFiles\I386, a folder that Windows might need to perform certain system-related tasks.

System Restore takes a snapshot of critical system files and some program files and stores this information as restore points.To clear off system restore points:

  1. Go to Start | All Programs | Accessories | System Tools | Disk Cleanup.
  2. Under 'More Options,' click the bottom button. This will remove all but the most recent restore point.

Cleaning up Service Pack and Windows Fix/Patch installations

You can delete the Service Pack uninstall files by navigating to C:\Windows\$NTServicePackUninstall. Once you do this, if you try to use the 'Remove' for Service Pack 2 in Add/Remove Programs, it will fail and will offer to delete the entry.

Note: Do not remove the ServicePackFiles folder (C:\Windows\ServicePackFiles), because it will be used in future by Windows File Protection. However, on an NTFS disk you can compress this folder. Doing this can save you about 200MB of disk space. Right-click on the folder, select Properties, click the Advanced button and select Compress.

You can also delete a Service Packs temporary folder. If it's still around, this folder will be on the drive where you downloaded the setup files (probably C:) and will have a long name of random letters.

Clean up other installation files. Navigate to C:\Windows\SoftwareDistribution\Download, and delete the contents of this directory as well.

Delete Windows patch/fix uninstall files. Navigate to C:\Windows and highlight any file that starts with "$NTUninstallKB." (You may also want to delete these files if your system has been running smoothly but you don't wish to uninstall any Windows fixes from Add/Remove Programs.)

Remove IE 7 Uninstall files. To do so, delete two folders: C:\WINDOWS\$NtServicePackUninstallIDNMitigationAPIs$ and C:\WINDOWS\$NtServicePackUninstallNLSDownlevelMapping$.

Extreme cleaning

Although I have not tested all the options he lists, a Windows guru who goes by the name Bold_Fortune does an excellent job of documenting his attempts to make Windows XP as slim as possible.

Last, but not least, don't forget to clean out your recycle bin!

About the author: Tim Fenner(MCSE, MCSA: Messaging, Network+ and A+) is a senior systems administrator who oversees a Microsoft Windows, Exchange and Office environment, as well as an independent consultant who specializes in the design, implementation and management of Windows networks.

More information on this topic:

  • Tip: Free up space on the hard drive containing your system folder
  • Topics: Disk drives
    Sign up for our RSS feed to receive expert advice every day.


Dig Deeper on Windows systems and network management