Sageset Unlocks CleanMgr’s Power

"Cleanmgr" is a disk-cleanup manager included in all Windows from Win98 onward. It doesn’t do a lot in Win98, but has gained power in succeeding releases. In Win2K and XP, it’s actually a decent little tool that has the potential to clean quite a bit from your system, and can even automatically compress little-used files to make them occupy less disk space. Oddly, simply running Cleanmgr does NOT normally give you access to its full power: Instead, you need to modify it a bit.

We’ll get to the mods in a moment, but if you want more info on CleanMgr, click one of these links:



Windows 2000:;EN-US;q253597


Now, to the mods:

For our purposes, we only need to focus on one pair of Cleanmgr commands: SAGESET and SAGERUN. These commands are designed to allow the Windows "System Agent" to automate the running of Cleanmgr, but we can co-opt it for our purposes.

Click on Start, Run then type

cleanmgr /sageset:99

in the Run box, and hit Enter. The Disk Cleanup Tool will run in a special mode that offers you an expanded selection of cleanup choices. Most importantly, it will remember whatever choices you make now, and re-use those same choices when you use a matching "sagerun" command later on.

For now, step through all the choices that the Disk Cleanup Tool offered you, and make whatever choices you wish. Note that some of the offered items may have additional options or advanced settings that become visible when you click or check the item.

I generally select everything that’s offered— I’m looking for maximum cleaning, so I just check everything. But you can select any, all, or none of the offered choices: It’s up to you.

And don’t worry. If you want to change your mind later, you can. Just re-run the command "cleanmgr /sageset:99" and make a new set of choices.

Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 10, Windows 8, Windows 7, Firefox, Internet Explorer, Google, etc. Join our 460,000 subscribers!

Enter your email above to receive messages about offerings by Penton, its brands, affiliates and/or third-party partners, consistent with Penton's Privacy Policy.
The Windows 7, Vol 3 (Excerpt)

Subscribe and get our monthly bonuses - free!

The Windows 7 Guide, Volume 3: Advanced maintenance and troubleshooting provides advanced tools for keeping Microsoft's premier operating system up and running smoothly. Get this excerpt and other 4 bonuses if you subscribe FREE now!

Fred Langa

About Fred Langa

Fred Langa is senior editor. His LangaList Newsletter merged with Windows Secrets on Nov. 16, 2006. Prior to that, Fred was editor of Byte Magazine (1987 to 1991) and editorial director of CMP Media (1991 to 1996), overseeing Windows Magazine and others.