Disk Cleanup (cleanmgr)
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
- Press Win+R, type cleanmgr and press Enter.
- Choose the system drive (usually C:).
- Select 'Clean up system files' to include update leftovers.
- Tick only the categories you understand; read the description of each.
- 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.
Related articles
- Temporary files in WindowsWhere Windows keeps temporary files (%TEMP%, C:\Windows\Temp), what is safe to delete and the supported ways to clean them.
- Storage SenseWhat Storage Sense does in Windows 10 and 11, which files it removes, and how to configure it safely.
- Windows.old folderWhat the Windows.old folder is, why it appears after an upgrade, how long Windows keeps it and how to remove it safely.
Sources
- Free up drive space in Windows (Microsoft Support) support.microsoft.com
- 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: