Cleaning Windows XP

clean Windows junk files and free up 2 gigs!

© 2010 by KV5R.

Overview

If your hard drive space is short, or if you just want to reduce the size of your backups, you can remove about 2 gigs of stuff from Windows. Note: These instructions are from my personal rebuild/install log. Disclaimers: Use at own risk. The author is not responsible for misuse, damage, nor unexpected results! If you don’t know about registry editing, DON’T!

These files are stored by the XP operating system to make it more stable with less maintenance. For example, if a system file becomes corrupted, Windows will automatically replace it. If you remove all this stuff, Windows may occasionally bother you for a CD. If you have plenty of hard drive space, and don’t mind the extra bloat, don’t remove this stuff.

This article is for people who want to remove this stuff, know what they’re doing, and understand the consequences.

Notes

  • This pertains to an XP-Pro system updated to SP-3 and a dozen or so security updates; plus IE7 and WMP-11, recently reinstalled in July 2008. YMMV.
  • Some people just delete this junk. A few have problems. I say, a DVD is cheap insurance—why not back it up first?
  • Do after all hardware is installed, and after all updates have been made, and XP is running stable for a week or two.
  • Your file manager must be set to show all files, hidden, system, protected, etc.
  • Set a Restore Point: “Before Junk Removal.”
  • Backing up: Do not use some backup program that creates a backup archive. Use Nero, or similar, to burn a data DVD, with all files in the clear. That way you don’t have to restore a whole folder; you can just let Windows look on your backup if it wants something, or restore a file manually.
  • Back up the following folders to a DVD-RW and then delete about 2 Gigs of junk.

Backup List

  • All c:\windows\$Nt{something}$ folders.
  • c:\windows\ServicePackFiles\
  • c:\windows\Driver Cache\
  • c:\windows\ie7\
  • c:\windows\ie7updates\
  • c:\windows\System32\dllcache\

…each with their subfolders and files.

Read and understand the following first.

Windows Update Uninstall Files

Backup, then delete c:\windows\$Nt*$ (500 megs). These are the update rollbacks. These folders may be deleted after backing them up. DO NOT remove $hf_mig$ — future updates depend on it.

What it does: After moving these, you can no longer (easily) uninstall updates. Some say you should also remove the entries for them from Add/Remove Programs. I say just leave them there. If you ever need to uninstall an update, just restore it’s folder and use Add/Remove to remove it. If not, you have to restore it, then find and run the spuninst.exe file therein. After you run a registry cleaner, the latter will apply, since the uninstall pointers will be removed.

After backing up the following folders, DO NOT delete any folders, just the files therein, as indicated.

ServicePackFiles

Backup: c:\windows\ServicePackFiles\

After backup, but before deleting, regedit:
HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\SourcePath
and ServicePackCachePath and ServicePackSourcePath,
to an i386 folder in the new location (your dvd drive), but do not add i386 (nor a trailing \ ) to the registry paths (the i386 is implicit).

My Current: D:\ServicePackFiles and D:\ServicePackFiles\ServicePackCache

Was: %systemroot%\ServicePackFiles and etc.

Then delete files in:
c:\windows\ServicePackFiles\i386 (600 megs)
c:\windows\ServicePackFiles\ServicePackCache\i386

…leaving the empty i386 folders intact.

What is does: ServicePackFiles adds to the overall cache of protected system files. If windows needs to replace any of these files, it should now ask for the media. If it won’t accept your media, just temporarily restore the servicepackfiles to make it happy, or locate the file it’s looking for and restore it manually (usually to windows\system32). Since you backed them up uncompressed, you should not have to expand them.

Driver Cache

Backup: c:\windows\Driver Cache\ (106 megs)

Regedit:
HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\SourcePath to an i386 folder in the new location (your dvd drive). Do not add i386 (nor trailing \ ) to the registry paths.

My Current: D:\Driver Cache (was: %systemroot%\Driver Cache).

Then delete files in it’s i386 folder.

What is does: If you install new hardware (or just plug in a USB device), windows may look for the Driver Cache. Put in your driver cache backup disk, or the install media (usually you will be using the hardware’s supplied install CD, but sometimes that also calls for additional Windows drivers, like for a new USB hub or something).

Internet Explorer 7

Backup and delete:

c:\windows\ie7\ (27 megs). These are the IE7-to-IE6 rollbacks.

c:\windows\ie7updates\KB*-IE7\ These are IE7 update rollbacks.

SoftwareDistribution

c:\windows\SoftwareDistribution\Download (760 megs).

These are the service pack(s) and updates via Windows Update. They should be backed up to optical so you don’t have to re-download them if they need to be reinstalled. The folders may be deleted in \download, leaving \download empty. Don’t delete other files in other folders in SoftwareDistribution. I think some of that stuff tells Windows Update what you do and do not have.

dllcache

Backup: c:\windows\System32\dllcache\ (220 megs).

Before deleting the dllcache files, zero SFCQuota in the registry, else it’ll immediately rebuild the cache.

Regedit: HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon and change SFCQuota from 0ffffff to 0, then run sfc /purgecache, which will delete the cached files for you. Note the \Windows NT\, not \Windows\, in the registry path above.

What it does: Set at 0, WFP will no longer cache dll files. This does not disable WFP or SFC, it just makes it ask you for the Windows install CD if it needs to replace a dll. If the dll in question is not in the Windows install CD, it'll be in servicepackfiles/i386 and/or dllcache/i386 on your backup DVD. WFP will not find it there, because your layout is different—it’s looking for D:\i386, not D:\somefolder\i386, and WFP stupidly does not give you the option to point it. Restore the missing dll manually, else make your DVD with dllcache files in \i386 of its root, not a subfolder.

conclusion

After studying the matter online for a couple hours, I carefully backed and removed nearly 2 gigs of rarely-used “convenience” stuff from Windows XP.

Why? Smaller backups, faster defrags, and tens of thousands of less files cluttering up the MFT.

If you have trouble, either undo your actions (restore your backups), or consult a guru. Please don’t ask me—I’m not a guru, and I don’t know what you did nor how your computer is laid out. All installations are different.

a few tips

You can crank your System Restore down from the default 10% to a couple gigs. You can limit you Recycle Bin size. You can limit your IE cache size. Finally, you can zip folders that contain thousands of data files you rarely use (like clipart and such).

Some computers come with the Windows install files in c:\i386, instead of an install disk. This can be moved to a CD, but you have to edit the registry so Windows can find it. I don’t have one, so consult others before doing so.

One more tip: I have found that Windows gets sluggish if you let your fonts folder get too big. Nearly every app you install nowadays seems to add more fonts you never use. For example, I have 1.5 gigs of RAM, but my system will barely run with 450 fonts—but pare that down to 150 fonts, and it screams. Be careful to not delete any fonts originally installed by Windows. Right after a fresh installation, back up your \windows\fonts\ folder, or make a dir file: Open a command window in \windows\fonts\, then type dir > fontlist.txt. Then, as you add applications, you can check it and remove unwanted new fonts. Don’t delete them, back them up, as some programs may complain, and you’ll have to restore them.

—KV5R

Leave a Reply

Your email address will not be published. Required fields are marked *