Skip to main content

If you just type cleanmgr in CMD, it’s exactly like opening the regular app. The real value comes from the switches (like /sageset and /sagerun ), which let you pre-select dozens of categories and run them all at once later.

The primary executable for disk cleanup is cleanmgr.exe . Simply typing cleanmgr in an elevated Command Prompt will launch the standard selection tool. Essential Command Switches

To get the most out of it, you’ll want to use these specific Microsoft-supported commands :

While most people use the graphical Disk Cleanup tool , the command line version ( cleanmgr.exe ) adds automation and deep-cleaning capabilities that are perfect for maintaining a healthy PC.

Note: Simply typing cleanmgr launches the standard GUI wizard. To truly harness the power of the command line, you must use specific switches (flags).