Running out of space on the C: drive of your Windows XP machine and no budget for a new PC? Then this article is for you!
Even though this article was written for Windows XP, I believe the tips should also be applicable to any other Windows version (as long as the files/folders mentioned further down actually exist).
Caution: Before you apply any of the tips mentioned in this article I'd like you to have a look at the disclaimer mentioned at the bottom of the article.
I've had the pleasure of seeing the following string in the Status Bar of my Explorer window while the focus was on the C: partition:
Disk free space: 0 bytes
This was after I got several error messages when logging on. There was not enough space free to load my profile. And that happened after I rebooted my machine because it had installed a batch of updates.
I was happy to see that even with all those errors, I could still get into Windows (XP SP3) – okay, it didn't load my background picture nor my favorite Explorer settings but who cares at that point – and free up some space. After doing that I rebooted and logged on again using my profile, this time it did load successfully.
As you may tell, I have been having space issues for a while now. Here are some tips that you can use if you want to free up space on the C: partition of a Windows XP installation.
Run Disk Cleanup
In case you're not familiar with this tool, have a look at this article at The Elder Geek
, or this Microsoft KB article
I run this occasionally, especially right before starting a defragmentation. To defragment my drives I use MyDefrag
which does it quite nicely btw.
If your partition is formatted using NTFS, you have the option of compressing your folders. This is an easy solution but usually it doesn't really give that much extra space. Unless you are storing a lot of large text files on your C: partition. Anyway, currently I have both my \Program Files\ and my \Documents and Settings\ folders compressed.
Beware though: SQL Server does not like its folders compressed
Move Swap File
If you haven't done so already, an easy way to free up space is to move the pagefile.sys to another partition. See the How to move the paging file in Windows XP KB article
for more info.
My paging file is on the D: partition.
Reduce Space For System Restore
Here's an interesting article about how the System Restore functionality uses harddisk space
. Now you know why you see the balloons popping out of the System Tray when you're in a space race :-)
The fastest way that I can think of to change the space usage settings are: Windows Key + Break > System Restore tab > select drive > Settings button.
As I recently ran out of space on the C: partition, practically all my restore points are gone already.
Good information about the System Restore tool is available here on Tech Republic
. With that info you'll be able to decide how to adjust your settings.
Remove Backup Folders
Hotfix Uninstall Folders
When Windows updates are installed, for each hotfix there will be a backup folder. You've probably already seen them. Under C:\Windows there are some folders called $NtUninstallKB123456$, or similar. You can even recognize the Knowledge Base number in the folder name.
These folders are only needed in case you want to uninstall a certain hotfix. Until now I never needed to do this. But still, to be safe, I keep the ones that have been installed recently, the last 3 months for instance. The rest, I delete.
More info on these folders: http://windowsxp.mvps.org/Hotfix_backup.htm
Service Pack Uninstall Folders
Similar to the hotfix folders, backup folders are being created when installing a Windows XP Service Pack. The folder that you may remove once you've decided that you will never want to uninstall your Service Packs is called $NtServicePackUninstall$.
Here's a good Microsoft KB article about
How to Remove Windows XP Service Pack 1 Folders
. Although it's aimed at SP1, it still applies if you've installed SP3. I have deleted all folders that contained “$NtServicePackUninstall” in their name.
Another good read
on this topic can be found on Tech Republic, where the writer covers a backup procedure in case you change your mind afterwards.
SQL Server Hotfix Backup Folders
Again similar to the Windows hotfix folders, hotfixes for SQL Server create uninstall folders as well. The folders that you may find back on your machine (depending on what components you've got installed) are:
These folders are for SQL Server 2005 and depending on what hotfixes you have installed you may have several similar folders with different KB numbers (the xxxxxx stands for a number).
I couldn't find an article to support this chapter of my writing, but here's a short discussion
about it with a comment from a Microsoft representative.
I removed them all. (Please do note that this is not on a production environment.)
Internet Explorer Update Backup Folders
Just like the uninstall folders mentioned earlier, patches for Internet Explorer are creating backups as well. On my machine I could find the following two folders:
If you don't plan on uninstalling Internet Explorer 7/8, it should be safe to delete the content of these folders. But I couldn't find an official statement to confirm this. If you know of an article that covers this please do let me know!
Until now I have not yet deleted these myself.
Remove SQL Server Setup Log Files
When performing installation changes to your SQL Server installation, including upgrades, several log files are created. These files are located under C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG for SQL Server 2005 and C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log for SQL Server 2008.
Check out the Books Online for info on how to view
and how to read
these setup log files.
If you're not in the middle of performing installation changes and all your previous changes were successful then it's safe to remove the content of this log folder.
More info on this folder related to security can be found in this MSSQLTips article
Resize The Partition
If with all of the above you're still struggling for space, only one option (besides a full re-install) remains: resize the partition!
I wasn't aware of a free tool that could do this until one of my friends told me about EASEUS Partition Master
. If you need it professionally or you have a 64-bit machine, check out the Professional Edition
With this tool I was able to first make my D: partition smaller and then increase the size of the C: partition.
And Windows XP ran happily ever after…
Have fun wiping out those files!
Disclaimer: I hope it's obvious for everyone that several of the manipulations mentioned above are not without any risk and should only be performed when you know what you're doing. And not in a production environment. And only when you're desperate (well, maybe not really but it helps) :-)
If, after this disclaimer, you still feel like giving me some praise, well, there's still that YES-button ;-)
Originally appeared at my blog: http://blog.hoegaerden.be/2009/08/19/free-up-space-on-your-c-partition
A really extensive list of files and folders that are safe to delete