Operating Systems

What is Disk Cleanup?

Disk Cleanup (cleanmgr.exe) is a Windows utility that frees drive space by deleting temporary files, Recycle Bin contents and old Windows Update files.

What is Disk Cleanup?

Disk Cleanup scans a drive for files Windows can safely remove and lists them by category, with the space each would free. It is a quick first step when a drive is nearly full, which on its own can cause failed updates, slow sign-ins and app crashes. Microsoft has been moving the same functions into the Settings app (Storage Sense and Cleanup recommendations), but cleanmgr is still included in Windows 11.

How to run it

  1. Press Win+R and type cleanmgr, search Start for Disk Cleanup, or right-click a drive in File Explorer and choose Properties > Disk Cleanup.
  2. Pick the drive if asked. Windows calculates how much it can free.
  3. Tick the categories you want, reading each description, then click OK and Delete Files.

The first pass covers only files the current user can remove. Click Clean up system files, which needs admin approval, to rescan with system categories added.

Common categories

CategoryNotes
Temporary files and Temporary Internet FilesSafe to remove
ThumbnailsRebuilt automatically when folders are viewed
Recycle BinPermanently deletes what the user discarded; confirm first
Delivery Optimization FilesCached update data shared with other PCs
Windows Update Cleanup (system files)Superseded update files; often the largest item
Previous Windows installation(s) (system files)The Windows.old folder kept after a feature update; deleting it removes the option to go back to the earlier version
Error reports and upgrade log filesLogs that may help troubleshooting; keep them until the problem is solved

Some versions also list the user's Downloads folder. Leave it unticked unless the user has approved deleting it, because it holds personal files. Disk Cleanup is for system clutter, not user data.

More Options tab

After Clean up system files, a More Options tab appears. Programs and Features opens the uninstall list, and System Restore and Shadow Copies deletes every restore point except the most recent one.

Command-line switches

  • cleanmgr /d C: opens Disk Cleanup for a specific drive.
  • cleanmgr /sageset:1 lets you choose categories and saves them as profile 1. cleanmgr /sagerun:1 runs that profile without prompting, so it can be scheduled with Task Scheduler.

Disk Cleanup vs. look-alike tools

  • Storage Sense (Settings > System > Storage) cleans temporary files and the Recycle Bin automatically on a schedule, and shows cleanup recommendations.
  • Optimize Drives (dfrgui) defragments hard drives and sends TRIM to SSDs. It frees no space.
  • chkdsk checks and repairs file-system errors. It does not remove clutter.
  • Disk Management (diskmgmt.msc) creates, resizes and formats partitions and volumes.

Disk Cleanup on the CompTIA A+ exam

Disk Cleanup is one of the Windows tools in Core 2 (220-1202) objective 1.4. Know the cleanmgr command, the Clean up system files button, and which categories carry risk: Recycle Bin, Downloads and Previous Windows installation(s). Cues: low disk space warning or an update that fails for lack of space, think Disk Cleanup with system files; the user may want to roll back a recent feature update, do not delete Previous Windows installation(s); the question says defragment or optimize, think dfrgui, not cleanmgr.

Studying for CompTIA (Operating Systems)?

ExamWizardz turns the official objectives into a guided study plan — with practice tests, realistic PBQs, and a readiness score. Start free.

Start studying free

Related terms