Freeing up drive space on Windows XP - Jon Galloway

Freeing up drive space on Windows XP

windirstatI just cleaned up my computer in preparation for an upgrade to Vista. Here's how I did it:

  1. Empty Recycle Bin (Yes, I know. Not rocket surgery so far. Keep with me, I'm getting warmed up.)
  2. If you bought a PC with XP preinstalled, consider running the PC Decrapifier. It clears out the useless bundled software the manufacturer included to cut costs through renewal kickbacks.
  3. Uninstall any programs you don't need. My criteria: If I can't remember what it is or haven't used it in 6 months, I don't need it. I use SAFARP (Small and Fast Add Remove Programs), but Windows Add / Remove Programs works here. [UPDATE] A comment reminded of something here - XP Hotfix Files. I've used (and recommend) Doug Knox's "XP Remove Hotfix Backup" program.
  4. Run CCleaner to clean up temporary files and clear out orphaned registry keys. Registry cleanup used to be simple until Office started stashing unused keys to indicate features which would be installed on first use, after which registry cleaners often did more harm than good. However, CCleaner is regularly updated and has always worked for me. If you're scared to monkey with the registry, CCleaner will still help find unused temporary (permatemp?) files which can be removed.
  5. Start looking for big files to be removed. I use FolderSize and WinDirStat for this. Actually, I use FolderSize more for day to day stuff, but for clearing out the underbrush with a machete style work, you can't beat WinDirStat. The treemap really helps you zoom in on the large files or folders; when you click on them they're automatically selected for you in the folder view above. By the way, the screenshot shows it working in Vista.

I can't tell you what kind of files to look for, but I can tell you what I found on my system. I'm a Microsoft.NET developer, so this list is tilted that way. If you'd like to post some specifics which are geared towards other user types, please do so in the comments.

So, here's what I found:

  • FolderShare Trash (C:\Documents and Settings\USER\Local Settings\Application Data\FolderShare\trash). FolderShare keeps backups of shared files after you've deleted them from the share, so if you've used FolderShare to transfer any large files they're probably still hanging out in your trash.
  • Unneeded ISO and Virtual Machine hard drives. Yeah, semi-obvious, but since this is a checklist of sorts I'd be remiss if I didn't mention them. For Virtual PC and Virtual Server, you're looking for VHD files. For VMWare, I believe you're looking for VMDK files. Also - if you're using VPC, look for Virtual PC Undo files (.vud) files.
  • SQL Server Backup files (.bak). I had several database backups I'd been holding on to "just in case" for a year or so. Gone.
  • SQL Server log files (.ldf). This one deserves a sidebar... or actually another post. Short answer - for a developer machine you can probably just set the recovery model for the database to Simple, then shrink the database from within SSMS.

How about you? How do you clean up a computer?

Published Sunday, December 17, 2006 1:25 AM by Jon Galloway

Comments

# re: Freeing up drive space on Windows XP

I use cccleaner mostly and degragment regurlarly. Hijack this also. But thanks for the tips you blogged. I find them very useful. Greetings from Holland.

Sunday, December 17, 2006 6:31 AM by eric blom

# re: Freeing up drive space on Windows XP

Two other othings I check for:

* ISO files from MSDN software. Either burn em to DVD, or delete em, especially if they're for old beta software.

* Unzipped downloads. I tend to keep around gigs of things I've downloaded from the net. When I unzip whatever I downloaded, I keep the original ZIP file as well. Going through and deleting the unzipped versions of things can really free up a lot of space.

Sunday, December 17, 2006 10:29 AM by kevindente

# re: Freeing up drive space on Windows XP

Don't forget the recovery partition that a lot of manfacturers includes. Also, look for the i386 directory that contains the XP install files. Removing it forces you to find an XP install CD if you change some settings or install a new driver under XP but you get a lot of disk space back.

Sunday, December 17, 2006 1:03 PM by Scott

# re: Freeing up drive space on Windows XP

- Find your lab technician,

- Setup your machine as a lab machine

Then, it's just a matter of hitting a key and your machine can be clean while going to lunch.

Sunday, December 17, 2006 9:40 PM by Jonathan de Halleux

# re: Freeing up drive space on Windows XP

My favourite disk-space-usage tool is the free JDiskReport from JGoodies.com ...

A good way to clean out those old OS hotfixes and service packs is to use the Search tool from your Start menu in your %windir% folder (the Advanced option has to be set to search system folders), for $*$ and then sort the results by date.  Shift-Delete any folders that are older than your comfort level.

Emptying your Recycle Bin doesn't get rid of all the junk lying around.  From the command line:

cd %temp%

if not errorlevel 1 rd /s /q .

cd %windir%\temp

if not errorlevel 1 rd /s /q .

Sure, you could be a wuss and use del *.* /s but then those junk subdirectories would be left lying around.  For that bit of safety from the rd, I've added the errorlevel check.

Your IE cache is probably all junk, so open your IE, go to Tools\Options, go to the Advanced tab, and at the bottom in the Security section, put a checkmark in the box for Empty Temporary Internet Files folder when  browser is closed.

After you've made space, assuming you're running Windows XP or newer, how about dropping to a command line and issuing:

at 4am /every:m,t,w,th,f,s,su defrag c:

By using AT instead of Scheduled Tasks, you don't need to remember to update this job when you change your password.

Andrew.

Sunday, February 25, 2007 6:36 PM by Andrew from Vancouver

# re: Freeing up drive space on Windows XP

dows anyone know if i can delete files in the installer directory? the directorys size is about 3,5 GB. There are some folders in it but these folders only take 200 MB, and there also are 455 files that take the rest 3.2 GB can i remove these files?

Monday, April 14, 2008 6:17 AM by longJohn

# re: Freeing up drive space on Windows XP

My computer just made an update and lost 1 gb

Sunday, June 1, 2008 1:19 PM by Martin

# re: Freeing up drive space on Windows XP

There are few additional ways to free up space:

1) Disable hibernation and delete hiberfil.sys. Will free amount of space equal to your RAM.

2) Disable system restore. Will free few gigabyes.

3) Make sure volumes are NTFS, and if they are, make most folders compressed (folder properties -> advanced). This can free serious amount of space (30%..50%), but movies and mp3s doesn't compress.

Saturday, December 6, 2008 4:17 PM by YourDoom