I’ve written before about the Disk Cleanup utility in Windows XP. This built-in program goes through and deletes temp files, cookies, and other unnecessary files off your hard disk. You can usually find it by choosing Start|Programs|Accessories|System Tools. (If you don’t see it in the list, it may be in a slightly different location in your Start menu or you may need to reinstall it from your Windows CDs.)
Various people have asked me what to do when Disk Cleanup doesn’t work. The program either doesn’t clean up everything or just plain stops and sits there, so you are left wondering, what if anything, it’s doing. Often this problem happens on computers with extremely full hard disks. The computer is behaving badly so the owner decides after three years of downloading every piece of garbage on the Internet that it’s time to tidy up.
The problem is that these neglected computers often have extremely fragmented hard disks or some errant file that is causing Disk Cleanup to fail. Disk fragmentation happens over time. It basically means that each of the files on your disk is no longer in one continuous block. Instead, pieces of your file are located in multiple different places (fragmented) across your hard disk. The computer has to work harder to find and reassemble the files when you want to access them.
Because Disk Cleanup is trying to access files to do its job, figuring out all the fragmented pieces of zillions of files across a fragmented hard disk can be just too much for it, so it gives up. Fortunately, Windows has a program called Disk Defragmenter you can use to fix the problem. Like Disk Cleanup, you access it by choosing Start|Programs|Accessories|System Tools. Be warned that it can take a long, long time to do its work on a really fragmented disk.
Another thing that can cause Disk Cleanup to fail is that it hits a bad temporary file and stops. To delete temporary files manually, you need to find out where your Windows "temp" folder is. Click Start|Run and type cmd. At the prompt, type set. Windows returns the location of your temp folder. Now you can navigate there in Windows Explorer and delete the files.
After you have deleted temp files and defragmented your hard disk, try running Disk Cleanup again. It should work fine.