What Is Cleanmgr.exe? How to Use Windows Disk Cleanup Safely
QUICK ANSWER cleanmgr.exe is Microsoft’s built-in Disk Cleanup utility for Windows 10, Windows 11, and supported Windows Server versions. It scans a selected...
QUICK ANSWER
cleanmgr.exe is Microsoft’s built-in Disk Cleanup utility for Windows 10, Windows 11, and supported Windows Server versions. It scans a selected drive for temporary files, cached data, Recycle Bin contents, old update files, and other items that Windows can remove to recover storage space.
Disk Cleanup is generally safe when you review the selected categories before deletion. However, removing the Recycle Bin, previous Windows installation, offline files, or certain diagnostic files can permanently remove data or recovery options. Disk Cleanup frees storage; it is not a general PC repair or performance-optimization tool.
What Is Cleanmgr.exe?
cleanmgr.exe is the executable file for the Windows Disk Cleanup utility. Its normal location is:
C:\Windows\System32\cleanmgr.exe
Disk Cleanup identifies files that are usually no longer required, presents the available categories, estimates how much space can be recovered, and deletes the categories you approve.
Microsoft documents cleanmgr as applicable to Windows 10, Windows 11, supported Windows Server releases, and recent Azure Local releases. The exact categories displayed depend on the Windows version, installed features, update history, selected drive, and whether Disk Cleanup is running with administrator privileges.
What Problem Does Cleanmgr Solve?
Windows and installed applications create temporary or cached files during normal operation. Windows updates, installations, web browsing, error reporting, graphics processing, and deleted files can also consume storage.
When the system drive becomes too full, you may experience:
- Failed or delayed Windows updates
- Insufficient-space warnings
- Problems installing or updating applications
- Reduced room for virtual memory, temporary files, and user data
- Slower operation in situations where Windows has very little working space
Cleanmgr removes eligible files to recover storage. It does not fix malware, registry problems, damaged system files, failing storage hardware, or high CPU and memory usage.
How to Verify That Cleanmgr.exe Is Genuine
A genuine copy is normally stored in the Windows system directory.
- Press Windows key + R.
-
Enter:
%SystemRoot%\System32 - Locate
cleanmgr.exe. - Right-click the file and select Properties.
- Open Digital Signatures, if shown, and verify that the signer is Microsoft.
A file named cleanmgr.exe running from a temporary folder, Downloads folder, user-profile subfolder, or another unexpected location should be investigated with Windows Security or your organization’s endpoint-protection system.
To see the copy that Windows resolves from the command line, run:
where cleanmgr
This command only displays matching paths; it does not prove that every listed file is trustworthy.
How to Open Disk Cleanup
Method 1: Use Windows Search
- Open Start.
- Search for Disk Cleanup.
- Select Disk Cleanup.
- Choose the drive you want to scan, usually
C:. - Select OK.
Method 2: Use the Run Dialog
- Press Windows key + R.
-
Enter:
cleanmgr - Select OK.
Method 3: Scan a Specific Drive
Open Run, Command Prompt, Windows Terminal, or PowerShell and enter:
cleanmgr /d C:
Replace C: with the required drive letter.
How to Use Disk Cleanup Safely
- Open Disk Cleanup.
- Select the drive to scan.
- Wait while Windows calculates the recoverable space.
- Select a category to read its description.
- Check only the categories you understand and want to remove.
- Select OK.
- Select Delete Files to confirm.
Before confirming, review the Recycle Bin and any category referring to downloads, previous Windows installations, offline files, or recovery data.
Deletion normally cannot be undone through Disk Cleanup. Important files should be backed up before performing a large cleanup.
How to Clean Up System Files
Some categories require administrator privileges.
- Open Disk Cleanup.
- Choose the Windows drive.
- Select Clean up system files.
- Approve the User Account Control prompt.
- Select the Windows drive again if requested.
- Wait for the second scan.
- Review the additional categories.
- Select the required items, and then select OK and Delete Files.
System-file cleanup may include old update components, upgrade files, installation logs, and previous Windows files. Scanning and deletion can take several minutes or longer.
Disk Cleanup Categories and Their Meaning
Available entries vary between computers. The following table explains common categories and their practical impact.
| Cleanup category | What it contains | Expected impact or caution |
|---|---|---|
| Temporary files | Short-term files created by Windows and applications | Usually safe. Open applications may recreate some files. |
| Temporary Internet Files | Cached legacy web content | Usually safe. Websites or legacy components may load cached data again. |
| Downloaded Program Files | Legacy ActiveX controls and Java applets downloaded by older web technologies | Usually safe on modern PCs. This is not normally the same as the personal Downloads folder. |
| Recycle Bin | Files that users previously deleted | Review first. Selected files are permanently removed. |
| Thumbnails | Cached image, video, and document previews | Safe, but File Explorer must recreate thumbnails, which can temporarily slow folder browsing. |
| DirectX Shader Cache | Compiled graphics shaders | Safe in most cases. Games and graphics applications may briefly rebuild the cache or stutter during the first subsequent run. |
| Delivery Optimization Files | Cached Windows update-delivery data | Generally safe. Windows may download required content again. |
| Windows Update Cleanup | Superseded or no-longer-required update components | Can recover substantial space. Cleanup may take time, and some superseded updates may no longer be removable afterward. |
| Windows upgrade log files | Logs produced during a Windows upgrade | Delete only when the upgrade is complete and the logs are not needed for troubleshooting. |
| System error memory dump files | Memory captured when Windows crashes | Safe for ordinary users after the problem is resolved. IT support may need these files for crash analysis. |
| System error minidump files | Smaller Windows crash-diagnostic files | Keep them while investigating blue-screen or crash problems. |
| Windows error reports | Diagnostic information generated after failures | Normally safe after troubleshooting is complete. |
| Temporary Windows installation files | Files created during Windows installation or upgrade | Usually safe after installation succeeds. Keep them if an upgrade problem is still being investigated. |
| Temporary setup files | Files left by completed setup programs | Normally safe once the relevant installation has finished successfully. |
| Device driver packages | Older driver packages retained in the driver store | Use caution. Removing older packages may limit the ability to roll back a driver. |
| Previous Windows installation | The previous Windows installation, commonly stored in Windows.old |
Major caution: removing it prevents using the normal rollback option to return to the previous Windows version. |
| Microsoft Defender Antivirus files | Noncritical files created by Microsoft Defender | Normally safe. This does not disable Defender or remove its active protection. |
| Offline files | Locally stored copies of network files intentionally available offline | Review carefully. Removing them can affect offline access until the files synchronize or download again. |
| Temporary offline files | Automatically cached copies of network files | Usually recoverable from the network, but they will not be available while disconnected until cached again. |
| Old CHKDSK files | Recovered file fragments produced by disk checking | Usually unnecessary, but inspect them first if you are attempting data recovery. |
| Language resource files | Resources for installed languages | Availability varies. Removing unused resources can affect optional language features. |
| BranchCache | Locally cached network content used in some managed environments | Consult the IT administrator on business PCs because content may need to be downloaded again. |
Do not select a category solely because it reports a large size. Its description and operational value should be considered first.
Important Difference: Downloaded Program Files and Downloads
Downloaded Program Files is a legacy cache category associated with older web components. It does not normally mean your personal files in:
C:\Users\<username>\Downloads
However, Windows storage interfaces can separately offer to delete files from the personal Downloads folder. Read the label carefully before confirming deletion.
Cleanmgr Command-Line Options
Open Command Prompt or Windows Terminal to use the following supported options.
| Option | Purpose |
|---|---|
cleanmgr |
Opens the standard Disk Cleanup interface |
cleanmgr /d C: |
Selects the drive to clean |
cleanmgr /sageset:n |
Opens an extended settings dialog and saves the selected cleanup profile as number n |
cleanmgr /sagerun:n |
Runs the cleanup profile previously stored as number n |
cleanmgr /tuneup:n |
Runs /sageset and /sagerun for the same profile number |
cleanmgr /lowdisk |
Runs Disk Cleanup with default settings |
cleanmgr /verylowdisk |
Runs with default settings without user prompts |
cleanmgr /autoclean |
Automatically removes files left after a Windows upgrade |
cleanmgr /? |
Displays command help |
For profile-based commands, n can be an integer from 0 through 9999.
Create and Run a Reusable Cleanup Profile
First, open an elevated Command Prompt and define profile 10:
cleanmgr /sageset:10
Select the categories to associate with the profile and confirm the dialog. Run the saved profile later with:
cleanmgr /sagerun:10
Microsoft states that /sagerun enumerates the computer’s drives and applies the saved profile. The /d option is not used with /sagerun.
To configure and run the same profile in one operation:
cleanmgr /tuneup:10
Run Disk Cleanup Without Confirmation Prompts
cleanmgr /verylowdisk
This option uses default settings without prompting the user. Administrators should test its behavior on the relevant Windows build before deploying it because available categories and default selections can vary.
Remove Post-Upgrade Files Automatically
cleanmgr /autoclean
This option targets files left after a Windows upgrade. Use it only after confirming that the upgraded installation works correctly and that rollback or upgrade troubleshooting is no longer required.
Administrator and Enterprise Considerations
Administrator rights are generally required to remove system-wide files and to use Clean up system files. Standard users may still clean eligible files associated with their own profile.
Before automating cleanmgr in an organization:
- Test the profile on the same Windows version and build used in production.
- Confirm which cleanup categories appear on that build.
- Preserve diagnostic dumps and logs while incidents are under investigation.
- Avoid removing previous installations during an active rollback period.
- Review offline-file, BranchCache, and shared-device requirements.
- Use Task Scheduler’s normal service-account and privilege controls.
- Confirm the result rather than assuming that every selected category was fully emptied.
Saved /sageset selections are stored in the Windows registry. Do not manually edit related registry values unless the process has been tested and documented.
What Is the Impact of Cleanmgr on a PC?
Positive Effects
Disk Cleanup can:
- Recover storage space
- Resolve some low-disk-space warnings
- Create room for Windows updates and application installations
- Remove outdated caches, logs, and temporary files
- Reduce unnecessary data retained on the drive
What It Usually Does Not Do
Disk Cleanup does not:
- Defragment or optimize the physical drive
- Repair corrupt Windows system files
- Repair the registry
- Remove all application caches
- Uninstall unused programs
- Detect storage-hardware failure
- Guarantee a faster PC
- Replace antivirus or endpoint protection
A PC that was critically low on space may operate more reliably after cleanup. On a system that already has sufficient free space, a noticeable speed improvement is unlikely.
Temporary Side Effects
After cleanup:
- Thumbnails may need to be regenerated.
- Games may rebuild DirectX shader caches.
- Windows or applications may download cached data again.
- Update cleanup may continue in the background or require a restart.
- Previously cached network files may become unavailable while offline.
- Deleted diagnostic logs will no longer be available for troubleshooting.
How to Check the Result
After Disk Cleanup finishes:
- Open File Explorer.
- Select This PC.
- Check the free space displayed for the cleaned drive.
- Restart Windows if update cleanup remains pending.
- Test critical applications, offline files, and recently updated drivers if their related cleanup categories were selected.
The final recovered space may differ from the original estimate because files can be in use, recreated immediately, or reserved by Windows.
Cleanmgr Versus Storage Sense and Cleanup Recommendations
Microsoft provides newer storage-management interfaces in Windows.
Storage Sense
Storage Sense can automatically remove eligible temporary files and aged Recycle Bin contents according to configured rules. It is better suited to ongoing automatic maintenance.
Find it under:
Settings > System > Storage > Storage Sense
Review its Recycle Bin, Downloads, and cloud-content settings carefully before enabling automatic cleanup.
Cleanup Recommendations
Cleanup recommendations help identify temporary files, large or unused files, cloud-synced content, and unused applications.
Find them under:
Settings > System > Storage > Cleanup recommendations
This interface is generally easier for Windows 11 users because it provides storage suggestions within Settings.
When to Use Each Tool
| Requirement | Recommended option |
|---|---|
| One-time interactive cleanup | Disk Cleanup or Cleanup recommendations |
| Automatic recurring maintenance | Storage Sense |
| Reusable command-line cleanup profiles | cleanmgr /sageset and /sagerun |
| Review large or unused personal files | Cleanup recommendations or File Explorer |
| Recover space after a Windows upgrade | Review system cleanup categories carefully; use /autoclean only when rollback is no longer needed |
Troubleshooting Cleanmgr
Cleanmgr Does Not Open
Try launching the system copy directly:
%SystemRoot%\System32\cleanmgr.exe
If the executable is missing or Windows components appear damaged, open Terminal or Command Prompt as administrator and run:
DISM.exe /Online /Cleanup-Image /RestoreHealth
sfc /scannow
These commands repair the Windows component store and protected system files; they do not perform Disk Cleanup.
The Scan Appears Stuck
Update and system-file scans can take time, particularly on a heavily used or nearly full system. Allow the process to finish before ending it. Restart Windows and try again if it remains unresponsive for an unusually long period.
Cleanmgr Recovers Less Space Than Estimated
Possible reasons include:
- Files are locked by active applications.
- Windows recreated cache files.
- Another account owns some files.
- Administrator privileges were not used.
- Servicing or update operations still require the files.
- The estimate included data that Windows later determined should be retained.
Free Space Disappears Again
A rapidly growing Temp folder may indicate a Microsoft Store, Windows Update, application, logging, or malware problem. Disk Cleanup treats the symptom but does not identify the underlying cause.
Check Settings > System > Storage, review installed applications, install Windows updates, and run a Windows Security scan. IT professionals should also investigate application logs, update failures, and unusually large directories.
Windows Update Cleanup Is Missing
The category appears only when eligible update files exist. It may also require Clean up system files and administrator approval.
Limitations and Safety Warnings
- Disk Cleanup is a deletion tool, not a backup utility.
- Deleted Recycle Bin contents are not moved elsewhere for recovery.
- Removing
Windows.oldprevents normal rollback to the previous Windows version. - Removing driver packages can reduce driver rollback options.
- Removing dump files and logs can hinder technical investigations.
- Offline and cached network files may be unavailable without network access.
- Cleanup categories differ by Windows version and system state.
- Third-party “PC cleaner” tools are not required to run cleanmgr and may introduce additional risk.
- Disk Cleanup cannot create meaningful space when applications or personal files consume most of the drive.
FAQ
Is cleanmgr.exe safe?
Yes, the genuine Microsoft executable in C:\Windows\System32 is a legitimate Windows component. The deletion choices still require review because some categories contain recoverable files, rollback data, offline content, or diagnostic information.
Does cleanmgr delete personal documents and pictures?
Standard temporary-file categories do not normally delete documents or pictures. However, files selected in the Recycle Bin are permanently deleted, and other Windows storage tools may separately offer to clean the personal Downloads folder.
Does Disk Cleanup make a PC faster?
It can improve reliability when a drive is critically low on free space. It generally does not produce a significant performance improvement when the PC already has adequate storage.
Is it safe to delete Windows Update Cleanup?
It is generally safe after updates are installed and working correctly. Deletion can remove superseded update data and may limit the ability to uninstall certain older updates.
Is it safe to delete a previous Windows installation?
Only if the current Windows installation works correctly and you no longer need the built-in option to return to the previous version. Deleting Windows.old through cleanup cannot be undone.
Does cleanmgr require administrator rights?
Basic user-level cleanup may not. Removing system-wide files and using Clean up system files normally requires administrator approval.
Can cleanmgr run automatically?
Yes. An administrator can create a cleanup profile with /sageset:n, run it with /sagerun:n, and schedule the tested command through Task Scheduler.
Is cleanmgr still available in Windows 11?
Yes. Microsoft’s current command documentation lists Windows 11 as supported. Windows 11 also provides newer options, including Storage Sense and Cleanup recommendations.
Should I use cleanmgr or Storage Sense?
Use cleanmgr for manual cleanup or reusable command-line profiles. Use Storage Sense for automatic maintenance, after reviewing its retention and deletion settings.
FINAL RECOMMENDATION / CONCLUSION
Use Disk Cleanup when Windows needs additional storage or when you want to remove known temporary and system files. Start with ordinary temporary files and caches, then use Clean up system files only after reviewing the consequences of each category.
Do not remove previous Windows installations, driver packages, offline files, crash dumps, or troubleshooting logs unless you are certain they are no longer needed. For regular maintenance, configure Storage Sense conservatively and use Cleanup recommendations to review large or unused content. Disk Cleanup should complement backups, storage monitoring, Windows Update, and security scanning—not replace them.
#Cleanmgr #CleanmgrExe #DiskCleanup #Windows11 #Windows10 #WindowsTips #WindowsMaintenance #FreeDiskSpace #TemporaryFiles #StorageSense #CleanupRecommendations #WindowsUpdateCleanup #SystemFiles #LowDiskSpace #PCMaintenance #WindowsCommands #CommandPrompt #ITSupport #SystemAdministration #Troubleshooting
SOURCES
Was this guide useful?
Your answer helps us keep BISONKB accurate and practical.