Disk Cleanup Command Prompt

While the graphical user interface (GUI) of the Windows "Disk Cleanup" utility ( cleanmgr.exe ) is perfectly functional, power users and IT administrators often prefer the Command Prompt for its speed, scripting capabilities, and automation potential.

: Displays the Disk Cleanup settings dialog and creates a registry key to save your selections. The n can be any integer from 0 to 65535. disk cleanup command prompt

cleanmgr /sagerun:100

The true utility of the command prompt lies in arguments that modify how the tool runs. Here are the most important switches: While the graphical user interface (GUI) of the

: IT pros, script writers, and users comfortable with CLI who need scheduled or unattended disk cleanup. cleanmgr /sagerun:100 The true utility of the command

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.