Rain WikiWindows · Linux · Android

Disk Cleanup (cleanmgr)

Built-in toolWindows 7, 8.1, 10, 11

Disk Cleanup (cleanmgr.exe) is the classic Windows tool for removing files that are no longer needed, such as temporary files, the Recycle Bin, thumbnails, Delivery Optimization files and leftovers from Windows updates. In Windows 11 the same categories are also offered in Settings > System > Storage > Temporary files.

1Categories

The first window lists files of the current user, for example Temporary Internet Files, Recycle Bin and Thumbnails. Each category shows its size and a short description, and only ticked categories are removed.

'Clean up system files' restarts the tool with administrator rights and adds system categories such as Windows Update Cleanup, Windows upgrade log files and Previous Windows installation(s).

2Command-line options

cleanmgr /sageset:1 opens a dialog to choose categories and saves the choice under the number 1; cleanmgr /sagerun:1 later runs that saved selection without questions, which is useful in scheduled tasks. '/d C:' chooses the drive.

3Disk Cleanup and Storage Sense

Microsoft develops the cleanup functions further in Settings (Storage Sense and Temporary files). Disk Cleanup remains available in Windows 10 and 11 and works the same way.

How to run Disk Cleanup

  1. Press Win+R, type cleanmgr and press Enter.
  2. Choose the system drive (usually C:).
  3. Select 'Clean up system files' to include update leftovers.
  4. Tick only the categories you understand; read the description of each.
  5. Select OK, then Delete Files.

Cautions

  • 'Previous Windows installation(s)' removes Windows.old: going back to the previous Windows version is then impossible.
  • 'Downloads', where offered, deletes your own downloaded files.
  • Windows Update Cleanup can take a long time; let it finish.

Sources

  1. Free up drive space in Windows (Microsoft Support) support.microsoft.com
  2. cleanmgr (Microsoft Learn) learn.microsoft.com

Note: Rain Cleaner explains each category, its size and what you give up before anything is deleted.

Last reviewed: