Cleanmgr.exe is Windows’ built-in Disk Cleanup utility that removes temporary files, system caches, and unnecessary data to free up hard drive space. This tool has been part of Windows since the late 1990s and remains one of the most effective ways to reclaim storage without third-party software.
Your computer slows down over time because files pile up. Update files, browser caches, old Windows installations, and temporary data consume gigabytes of space. Cleanmgr.exe targets these exact files, giving you back storage and potentially improving system performance.
What Is Cleanmgr.exe?
Cleanmgr.exe is an executable file located in C:\Windows\System32\ that launches the Disk Cleanup utility. When you run it, Windows scans your drives and identifies safe-to-delete files across multiple categories.
The tool was designed for users who don’t want to manually hunt through folders to find what’s eating their storage. It presents a simple checkbox interface showing file types and their sizes.
Key features:
- Analyzes disk space usage automatically
- Shows estimated space you’ll recover before deletion
- Includes system files cleaning (with elevated permissions)
- Works on all Windows versions from XP through Windows 11
- Completely free and built into the operating system
Unlike third-party cleaners that often include bloatware or dubious “registry cleaners,” cleanmgr.exe only removes files Microsoft has verified as safe to delete.
How to Run Cleanmgr.exe
Method 1: Using Run Command
Press Windows + R to open the Run dialog. Type cleanmgr and press Enter. A drive selection window appears if you have multiple drives. Choose the drive you want to clean and click OK.
Method 2: Through File Explorer
Open File Explorer and right-click any drive (usually C:). Select Properties from the menu. In the General tab, click the Disk Cleanup button. This launches cleanmgr.exe for that specific drive.
Method 3: Search Menu
Click the Start menu and type “disk cleanup” in the search bar. Click Disk Cleanup when it appears in results. This method works identically to the Run command.
Method 4: Command Prompt or PowerShell
Open Command Prompt or PowerShell as administrator. Type cleanmgr.exe and press Enter. For advanced options, you can add parameters like cleanmgr /sageset:1 to configure cleanup profiles.
What Files Does Cleanmgr.exe Remove?
The tool categorizes cleanable files into specific types. Here’s what each category contains:
| File Category | What It Includes | Safe to Delete? |
|---|---|---|
| Temporary Internet Files | Browser cache, cookies, web page files | Yes |
| Downloaded Program Files | ActiveX controls and Java applets from websites | Yes |
| Recycle Bin | Deleted files waiting for permanent removal | Yes (if you’re sure) |
| Temporary Files | App and system temporary files in %TEMP% folder | Yes |
| Thumbnails | Image previews for folders and files | Yes |
| Windows Update Cleanup | Old update files after successful installation | Yes |
| System Error Memory Dump Files | Crash dumps for troubleshooting (very large) | Yes (unless debugging) |
| Previous Windows Installation(s) | Old Windows folder from major updates | Yes (after 10 days if stable) |
| Delivery Optimization Files | Update files shared with other PCs | Yes |
Temporary Internet Files are usually the biggest space hogs. Browsers cache website data to load pages faster, but this cache grows to several gigabytes over time.
Windows Update Cleanup becomes available after major Windows updates. These files can consume 10-20 GB but should only be deleted if your system runs stable after the update.
Previous Windows Installations appears after upgrading to a new Windows version. This folder lets you roll back if something breaks. After 10 days, Windows auto-deletes it, but you can remove it manually through cleanmgr.exe to reclaim 20+ GB immediately.
Using Cleanmgr.exe to Clean System Files
Basic Disk Cleanup misses many large system files. To access deeper cleaning options, you need administrative privileges.
Step-by-step process:
- Open Disk Cleanup using any method above
- Wait for the initial scan to complete
- Click Clean up system files button at the bottom
- Wait for another scan (this one takes longer)
- New categories appear, including Windows Update files
- Check the boxes for files you want to remove
- Click OK, then Delete Files to confirm
The system files scan reveals significantly more cleanable data. On systems that haven’t been cleaned in months, you might recover 30-50 GB.
Important: The “Clean up system files” option requires administrator rights. If you’re on a work computer with restricted access, you won’t see this button.
Advanced Cleanmgr.exe Parameters
Power users can automate or customize Disk Cleanup using command-line parameters. These switches control cleanmgr.exe behavior without manual clicking.
Sageset and Sagerun
These parameters create and execute cleanup profiles.
Create a profile:
cleanmgr /sageset:1
This opens a selection window where you check which file types to clean. Your selections save as profile “1”. You can create multiple profiles (1-9999).
Execute a profile:
cleanmgr /sagerun:1
This runs the cleanup automatically using profile 1’s settings. No user interaction needed. Perfect for scheduled tasks.
Lowdisk Parameter
cleanmgr /lowdisk
Runs Disk Cleanup with all options pre-selected. Microsoft designed this for emergency situations when drive space drops critically low.
Drive Selection
cleanmgr /d C:
Directly specifies which drive to clean, skipping the selection dialog.
Autoclean Parameter
cleanmgr /autoclean
Available in Windows 10 and later. Performs automatic cleanup using Microsoft’s default safe selections.
Automating Cleanmgr.exe with Task Scheduler
Regular automated cleaning prevents storage issues before they occur. Windows Task Scheduler can run cleanmgr.exe weekly or monthly.
Setup instructions:
- Press Windows + R, type
taskschd.msc, press Enter - Click Create Basic Task in the Actions panel
- Name it “Weekly Disk Cleanup” and click Next
- Choose Weekly trigger, click Next
- Select your preferred day and time, click Next
- Choose Start a program, click Next
- Browse to
C:\Windows\System32\cleanmgr.exe - Add arguments:
/sagerun:1(assumes you created profile 1) - Click Finish
The task runs automatically every week at your specified time. Your system stays clean without manual intervention.
Pro tip: Run the task during off-hours or lunch breaks. Cleanup can slow down your computer temporarily while it deletes files.
Cleanmgr.exe vs. Storage Sense in Windows 10/11
Windows 10 and 11 include Storage Sense, a newer automatic cleanup feature. It overlaps with cleanmgr.exe but offers scheduled automation through Settings instead of Task Scheduler.
How they differ:
Storage Sense runs in the background automatically. It deletes temporary files and recycle bin items based on rules you configure. You set it once in Settings > System > Storage.
Cleanmgr.exe requires manual execution or Task Scheduler setup. It provides more granular control over what gets deleted and when.
Which should you use?
Enable Storage Sense for continuous automated maintenance. Run cleanmgr.exe manually every few months for deeper cleaning, especially the “Clean up system files” option that recovers Windows Update files.
Common Cleanmgr.exe Problems and Solutions
Issue: Cleanmgr.exe Won’t Open or Crashes
Causes and fixes:
Corrupted system files prevent cleanmgr.exe from launching. Open Command Prompt as administrator and run:
sfc /scannow
This System File Checker repairs damaged Windows files. Restart after completion and try cleanmgr.exe again.
Alternatively, corrupted Disk Cleanup handlers cause crashes. Reset them by running:
cleanmgr /setup
This rebuilds the cleanup configuration from scratch.
Issue: Stuck on “Scanning” Forever
Cleanmgr.exe might hang while calculating disk space, especially on older hard drives with heavy fragmentation.
Quick fixes:
- Close unnecessary programs to free up system resources
- Temporarily disable antivirus scanning
- Delete the folder C:\Windows\Temp manually through File Explorer
- Restart Windows and try again immediately after boot
If scanning still hangs, your drive might have physical issues. Run Check Disk:
chkdsk C: /f
Schedule it for next restart and let it complete.
Issue: “Not Enough Space” Error During Cleanup
Ironically, Disk Cleanup needs temporary space to reorganize files during deletion. If your drive is 100% full, cleanmgr.exe itself can’t run.
Emergency solution:
Manually delete large files first. Empty Recycle Bin by right-clicking it and selecting Empty Recycle Bin. Delete downloads you don’t need. Then run cleanmgr.exe once you have at least 1 GB free.
Issue: Insufficient Permissions
“Access denied” or permission errors appear when trying to delete system files without administrator rights.
Fix:
Always run cleanmgr.exe as administrator for full functionality. Right-click the Start menu, select Windows Terminal (Admin) or Command Prompt (Admin), then type cleanmgr.
How Much Space Will Cleanmgr.exe Free Up?
Results vary dramatically based on your computer’s age and usage patterns. Here’s what typical users see:
Recently cleaned system (cleaned within 30 days):
- 500 MB to 2 GB recovered
- Mostly temporary internet files and caches
Moderately neglected system (3-6 months uncleaned):
- 5 GB to 15 GB recovered
- Includes Windows Update files and older temp data
Heavily neglected system (1+ year uncleaned):
- 20 GB to 50+ GB recovered
- Old Windows installations, multiple update archives, massive browser caches
After major Windows updates:
- 15 GB to 30 GB from Previous Windows Installation folder alone
Gaming computers with many installed titles might not recover much since game files aren’t removable through cleanmgr.exe. Conversely, laptops used primarily for web browsing often have massive browser caches.
Best Practices for Using Cleanmgr.exe Safely
Always verify you don’t need items before deletion. The Recycle Bin option shows a size, but you can’t preview which files are inside. Open Recycle Bin separately if you’re uncertain.
Wait 10 days after major Windows updates before removing Previous Windows Installation files. This gives you time to ensure stability and preserves your rollback option if critical bugs appear.
Don’t delete system error memory dumps if you’re troubleshooting crashes. These dump files help diagnose why Windows blue-screened. If your system runs stable, they’re safe to remove.
Run cleanmgr.exe before disk imaging or backups. Cleaning first reduces backup size and time significantly.
Combine with manual folder checks. Cleanmgr.exe doesn’t touch user documents, videos, or the Downloads folder. Check C:\Users\YourName\Downloads separately for forgotten large files.
Understanding the Disk Cleanup Interface
When cleanmgr.exe opens, you see two tabs: Disk Cleanup and More Options.
Disk Cleanup Tab
This main tab lists all file categories with checkboxes. Each item shows:
- File type name
- Description when you click it
- Space it will free up
- Checkbox to include/exclude it
The description appears in the bottom text box. Always read this before checking unfamiliar items.
Total space to gain appears at the bottom in bold. This number updates as you check/uncheck items.
More Options Tab
This tab contains two powerful sections:
Programs and Features:
Opens the uninstaller to remove applications. Large programs consume gigabytes that cleanmgr.exe itself can’t delete.
System Restore and Shadow Copies:
Lets you delete all except the most recent restore point. This can free 10+ GB if you have multiple restore points.
Warning on restore points: Only delete old restore points if you’re confident your system runs perfectly. These let you roll Windows back to earlier states if problems occur.
Cleanmgr.exe Security and Privacy Considerations
Is cleanmgr.exe safe? Absolutely. It’s a legitimate Windows component digitally signed by Microsoft.
Verify authenticity:
Check the file location. Real cleanmgr.exe lives at:
C:\Windows\System32\cleanmgr.exe
Right-click the file and select Properties. Go to the Digital Signatures tab. Verify Microsoft Windows is the signer with a valid signature.
Malware sometimes disguises itself as cleanmgr.exe but places itself in other folders like Downloads or Temp. If you find cleanmgr.exe anywhere except System32, it’s likely malicious.
Privacy note: Deleting temporary internet files and cookies logs you out of websites and clears browsing history stored in system caches. This enhances privacy but means re-entering passwords on your next visit.
Form data and saved passwords in browsers remain untouched. Cleanmgr.exe only removes system-level caches, not browser-stored credentials.
According to security guidance from CISA, regularly clearing temporary files reduces attack surface by removing potentially exploitable cached data.
When NOT to Use Cleanmgr.exe
During active Windows updates:
Never run Disk Cleanup while updates download or install. You might delete files the update process needs, causing installation failure or corruption.
On shared computers without permission:
In offices or shared households, disk cleanup affects all users. One person’s cleanup deletes another user’s temporary files. Get consensus first.
When troubleshooting software issues:
If an app misbehaves, temporary files might contain clues for support staff. Hold off on cleanup until after diagnosis.
On extremely old computers:
Windows XP and earlier versions had buggier cleanmgr.exe implementations. These older versions occasionally deleted wrong files. If you’re somehow still running XP in 2026, use extreme caution or upgrade immediately for security reasons.
Immediately after software installation:
Some installers leave temporary setup files that uninstallers reference. Wait 24 hours after installing major programs before running cleanup.
Alternatives to Cleanmgr.exe
While cleanmgr.exe works excellently, other tools offer additional features:
Storage Sense (built into Windows 10/11):
Automatic scheduled cleaning with configurable rules. Enables one-time setup for ongoing maintenance.
Windows Settings > Storage:
Visual breakdown of storage usage by category. Click categories to dig deeper and delete specific apps or files manually.
CCleaner:
Third-party tool with more aggressive cleaning and registry cleaning. Free version available but includes bundled offers during installation.
BleachBit:
Open-source cleaner for privacy-focused users. Removes more traces than cleanmgr.exe but requires technical knowledge to use safely.
Manual deletion:
Power users often skip automated tools entirely. Directly delete folders like C:\Windows\Temp, %TEMP%, and C:\Windows\SoftwareDistribution\Download after stopping Windows Update service.
For most users, cleanmgr.exe plus Storage Sense provides everything needed without installing additional software.
Conclusion
Cleanmgr.exe remains a reliable, safe, and effective way to reclaim disk space on Windows computers. This built-in tool removes gigabytes of unnecessary files without the risks of third-party utilities.
Run it monthly for preventive maintenance. Use the “Clean up system files” option every few months for deeper cleaning. Automate it through Task Scheduler if you prefer hands-off maintenance.
The tool works the same way today in 2026 as it did decades ago. Microsoft keeps it updated and functional across all Windows versions because it solves a universal problem—computers fill up with junk over time.
Start with cleanmgr.exe before considering paid cleanup software. You’ll likely find it handles everything you need completely free.
Frequently Asked Questions
Is it safe to delete all files in Disk Cleanup?
Yes, but read each category’s description first. Cleanmgr.exe only lists genuinely safe-to-delete files. The Recycle Bin and Previous Windows Installation options deserve special consideration. Everything else is temporary or cached data that Windows recreates as needed. Never fear breaking Windows by using Disk Cleanup—Microsoft designed it specifically to be foolproof.
How often should I run cleanmgr.exe?
Run it monthly for regular maintenance. Systems with heavy browser usage or frequent Windows updates benefit from bi-weekly runs. If storage space isn’t an issue, quarterly cleaning suffices. Automate it through Task Scheduler so you don’t need to remember. The frequency depends on your usage patterns more than any universal rule.
Does cleanmgr.exe improve computer performance?
Indirectly, yes. Freeing up disk space prevents performance degradation when drives approach capacity. Very full drives (over 90% capacity) slow down noticeably. Removing temporary files also eliminates clutter that can cause software conflicts. Don’t expect dramatic speed boosts, but maintaining adequate free space keeps your system running smoothly.
Can cleanmgr.exe delete viruses or malware?
No. Disk Cleanup removes legitimate temporary files only. It doesn’t scan for or remove malicious software. Use Windows Defender or dedicated antivirus tools for malware removal. However, clearing temp folders does remove some tracking cookies and cached web content that could contain adware.
What’s the difference between cleanmgr.exe and defragmenting?
Completely different functions. Cleanmgr.exe deletes unnecessary files to free up space. Defragmentation reorganizes existing files on your hard drive for faster access. Both improve system health but address separate issues. Run Disk Cleanup to remove junk, then defragment to optimize remaining files. Modern SSDs don’t need defragmentation, only traditional spinning hard drives benefit from it.
