Skip to content
WindowsIntermediate

Cleanmgr (Disk Cleanup) in Windows: How It Works, Commands, Benefits, and Limitations

QUICK ANSWER Cleanmgr.exe is Microsoft’s built-in Disk Cleanup utility for removing selected categories of unnecessary files, such as temporary files, Recycl...

BI
Bison Technical Team Enterprise IT specialists
Updated 18 Sep 2026 12 min read 1 total views

QUICK ANSWER

Cleanmgr.exe is Microsoft’s built-in Disk Cleanup utility for removing selected categories of unnecessary files, such as temporary files, Recycle Bin contents, thumbnails, error reports, and eligible Windows Update files. Run cleanmgr to use the graphical interface, or use options such as /sageset and /sagerun to create and run reusable cleanup profiles.

Advertisement

Cleanmgr can safely reclaim storage when you review the selected categories carefully. However, deleting the Recycle Bin, Downloads, previous Windows installations, memory dumps, or offline files can remove information you still need. On Windows 11, Microsoft also provides Storage Sense and Cleanup recommendations as newer storage-management options.

 

What Is Cleanmgr?

Cleanmgr.exe is the executable for the Windows Disk Cleanup utility. It scans a selected drive for files that Windows considers eligible for cleanup, groups them into categories, and estimates how much space can be recovered.

The executable is normally located at:

 
C:\Windows\System32\cleanmgr.exe
 

Microsoft currently documents Cleanmgr as applicable to Windows 10, Windows 11, Windows Server 2016, Windows Server 2019, Windows Server 2022, and Windows Server 2025. The categories displayed can vary according to the Windows version, installed components, selected drive, user account, and whether the tool has administrative privileges.

Cleanmgr is primarily a storage-maintenance tool. It is not:

  • A malware scanner
  • A registry cleaner
  • A disk-health or file-system repair utility
  • A duplicate-file finder
  • A secure data-erasure tool
  • A replacement for uninstalling unused applications

Why Cleanmgr Is Useful

Running Disk Cleanup can provide several practical benefits:

  • Reclaim space used by temporary and obsolete files
  • Create room for Windows updates and application installations
  • Remove outdated update or upgrade data when it is no longer required
  • Empty the Recycle Bin after its contents have been reviewed
  • Remove cached thumbnails and other data that Windows can rebuild
  • Create reusable cleanup profiles for administrative maintenance
  • Reduce manual searching through protected Windows folders

Freeing space can help when a nearly full drive is preventing updates or normal application operation. It does not automatically make every computer faster, and the amount recovered depends on the files available for removal.

How Cleanmgr Works

Cleanmgr uses registered cleanup handlers to examine supported file categories. It calculates the removable data for each applicable category and displays an estimated size.

The normal process is:

  1. Cleanmgr scans the selected drive.
  2. It lists available cleanup categories.
  3. The user selects the categories to remove.
  4. Cleanmgr requests confirmation.
  5. The corresponding cleanup handlers delete eligible files.
  6. Windows recreates certain caches later if they are needed.

A scan can take longer when Windows Update files, old installations, error dumps, or a large collection of temporary files must be evaluated.

The displayed space is an estimate. Actual recovery may differ because files can be locked, changed, deleted by another process, or recreated by Windows and applications.

How to Check Available Disk Space

Before and after cleanup:

  1. Press Windows + E to open File Explorer.
  2. Select This PC.
  3. Look under Devices and drives.
  4. Note the available space on the target drive.

This provides a simple way to verify the result. Disk Cleanup also displays an estimate before deletion.

How to Run Cleanmgr Safely

Method 1: Open Disk Cleanup from Search

  1. Open Start.
  2. Search for Disk Cleanup.
  3. Select the Disk Cleanup application.
  4. Choose the drive to scan, if prompted.
  5. Select each category to see its description.
  6. Check only the categories you want to remove.
  7. Select OK, followed by Delete Files.

Close active applications first when practical. This reduces the chance that temporary files will be locked or immediately recreated.

Method 2: Use the Run Dialog

Press Windows + R, enter:

 
cleanmgr
 

Select OK.

To request a particular drive:

 
cleanmgr /d C:
 

Replace C: with the required drive letter.

Method 3: Clean Up System Files

Some system-level categories require elevation.

  1. Open Disk Cleanup.
  2. Select Clean up system files.
  3. Approve the User Account Control prompt.
  4. Select the drive again if prompted.
  5. Wait for the additional scan.
  6. Review the categories carefully.
  7. Confirm the cleanup.

An administrator account or administrator credentials may be required. System cleanup can expose categories such as Windows Update Cleanup and previous Windows installations.

Understanding Common Cleanup Categories

The precise list is not fixed. The following are common examples:

Category What it generally contains Important consideration
Temporary files Short-term data created by Windows and applications Active or recently needed files may be excluded automatically
Recycle Bin Files previously deleted through Windows Review it first; cleanup permanently removes selected contents
Thumbnails Cached previews for pictures, videos, and documents Safe to rebuild, but folders may initially load previews more slowly
DirectX Shader Cache Compiled graphics shader data Windows and applications can rebuild it
Delivery Optimization files Cached update-delivery data Windows can download required update content again
Windows error reports Diagnostic information from crashes and errors Keep it if troubleshooting an unresolved problem
System error memory dumps Memory data captured during crashes Valuable for debugging blue-screen or system failures
Temporary Internet files Legacy cached web content The exact category depends on installed Windows components
Offline files Locally cached network files Confirm that required network data is synchronized first
Windows Update Cleanup Superseded update-related data Removal can reduce some update-removal or troubleshooting options
Previous Windows installation Data such as Windows.old after an upgrade Deleting it removes the ability to return to that installation through the normal rollback process
Downloads Files in the user’s Downloads folder, when offered Treat as personal data; inspect it before selecting

Important Warning About Previous Windows Installations

Windows can retain the previous installation for a limited period after an upgrade. If you remove that installation, the action cannot be undone through Disk Cleanup, and you lose the normal option to return to the previous Windows version.

Confirm that the upgraded installation works correctly before deleting this data.

Important Warning About Downloads

If a Downloads category appears, it can refer to personal files rather than disposable system cache. Do not select it without reviewing the folder.

“Downloaded Program Files” is a separate legacy category and does not mean the same thing as the personal Downloads folder.

Cleanmgr Command-Line Options

Microsoft documents the following syntax:

 
cleanmgr [/d <driveletter>] [/sageset:n] [/sagerun:n] [/tuneup:n] [/lowdisk] [/verylowdisk]
 

It also documents /autoclean and /?.

Option Purpose
/d <driveletter> Selects the drive to clean; it is not used with /sagerun
/sageset:n Opens the settings dialog and saves the selected cleanup profile under number n
/sagerun:n Runs the cleanup tasks previously saved under profile number n
/tuneup:n Runs /sageset and /sagerun for the same profile number
/lowdisk Runs Disk Cleanup with its default settings
/verylowdisk Runs with default settings without user prompts
/autoclean Automatically deletes eligible files left after a Windows upgrade
/? Displays command help

For /sageset, /sagerun, and /tuneup, n can be an integer from 0 through 9999.

Create and Run a Cleanup Profile

Open Command Prompt as an administrator and create profile 10:

 
cleanmgr /sageset:10
 

Select the desired categories and save the settings. Run the profile later with:

 
cleanmgr /sagerun:10
 

To configure and run the same profile in sequence:

 
cleanmgr /tuneup:10
 

The profile number is only an identifier. It does not represent a cleanup level or percentage.

Important Behavior of /sagerun

According to Microsoft, /sagerun:n enumerates all drives and runs the selected profile against them. The /d option is therefore not used with /sagerun.

This matters when designing maintenance scripts: do not assume that the following combination restricts the saved profile to one drive:

 
cleanmgr /d C: /sagerun:10
 

Use the graphical mode with /d when you specifically need to select a drive interactively.

Automating Disk Cleanup

A saved cleanup profile can be launched from Task Scheduler.

Recommended Process

  1. Open Command Prompt as an administrator.
  2. Run cleanmgr /sageset:10.
  3. Select conservative cleanup categories.
  4. Open Task Scheduler.
  5. Create a task with an appropriate schedule.
  6. Set the program to:
 
C:\Windows\System32\cleanmgr.exe
 
  1. Add this argument:
 
/sagerun:10
 
  1. Use Run with highest privileges only when the selected cleanup categories require administrative access.
  2. Test the profile manually before relying on the scheduled task.

Avoid automatically selecting personal Downloads, diagnostic dumps needed by support teams, offline files, or rollback data. Review automated configurations after major Windows upgrades because available categories and system requirements can change.

Permissions and Administrator Requirements

Standard users can generally clean eligible files from their own context. Administrative elevation is commonly required to expose or remove protected system files.

For business environments:

  • Test the cleanup profile on representative systems.
  • Do not assume every device presents identical categories.
  • Avoid running untested aggressive cleanup commands across an organization.
  • Retain memory dumps while investigating system crashes.
  • Consider support, rollback, compliance, and retention requirements.
  • Run scheduled tasks under an approved account with only the privileges required.

What to Expect After Cleanup

After a successful cleanup:

  • Available disk space should increase.
  • The Recycle Bin may be empty if selected.
  • Thumbnail previews may be regenerated.
  • Some cached data may be downloaded or recreated.
  • Windows Update cleanup may continue for a while.
  • A restart may be helpful if pending servicing operations or locked files are involved.
  • Removed previous-installation data will no longer be available for normal rollback.

Cleanmgr does not normally display a detailed deletion report. Compare free space before and after running it to evaluate the result.

Limitations of Cleanmgr

Cleanmgr has several important limitations:

  • It removes only categories supported by its cleanup handlers.
  • It does not show every large file consuming storage.
  • It does not uninstall applications correctly.
  • It may not recover the full estimated amount.
  • Some files cannot be removed while they are in use.
  • Cached data can return over time.
  • Its command-line profiles are category-based, not granular file-selection rules.
  • /sagerun is not designed to target only one drive.
  • It cannot fix storage hardware errors or file-system corruption.
  • Cleanup alone cannot solve a drive that is too small for the installed workload.

Do not manually delete unfamiliar files from C:\Windows, Program Files, ProgramData, or application-data directories simply because Cleanmgr did not remove them.

Cleanmgr Compared with Storage Sense

Feature Cleanmgr Storage Sense
Manual graphical cleanup Yes Yes, through Windows Storage settings
Command-line cleanup profiles Yes Not through the Cleanmgr profile commands
Automatic recurring cleanup Through Task Scheduler Built-in scheduling options
Cleanup recommendations Limited category list Windows 11 provides dedicated recommendations
Best use Manual or scripted category-based cleanup Ongoing storage management
Personal-file risk Depends on selected categories Depends on configured Recycle Bin, Downloads, and cloud-content rules

On Windows 11, go to:

Settings > System > Storage

From there, use:

  • Temporary files for a reviewed manual cleanup
  • Cleanup recommendations to examine temporary files, large or unused files, cloud-synced files, and unused applications
  • Storage Sense for recurring cleanup

Storage Sense operates primarily on the system drive. Its behavior should be reviewed before activation, particularly its rules for the Recycle Bin, Downloads folder, and locally available cloud content.

Troubleshooting Cleanmgr

Cleanmgr Does Not Free Much Space

Possible reasons include:

  • Few eligible files exist.
  • Large personal files or applications are using the space.
  • System-level categories were not scanned.
  • Files are currently locked.
  • Temporary data was quickly recreated.
  • The estimated files were changed or removed during cleanup.

Run Clean up system files, then check Settings > System > Storage for a broader view. Uninstall applications through Settings > Apps > Installed apps instead of deleting their folders.

Cleanmgr Appears Stuck

Windows Update Cleanup and large temporary-file collections can take time. Allow the process to finish when possible.

If it remains unresponsive:

  1. Wait and check whether disk activity continues.
  2. Restart Windows if no cleanup or servicing operation is progressing.
  3. Install pending Windows updates.
  4. Run Cleanmgr again.
  5. Use Storage settings to determine which storage category remains large.

Do not force shutdown during active Windows servicing unless the system is completely unresponsive.

/sagerun Does Not Delete the Expected Categories

Confirm that:

  • The same profile number was used with /sageset and /sagerun.
  • The profile was created in the intended system and security context.
  • The task has the necessary permissions.
  • The selected cleanup categories currently contain eligible files.
  • The categories are available on that Windows installation.

Reopen the profile with:

 
cleanmgr /sageset:10
 

Review its selections, save it, and test:

 
cleanmgr /sagerun:10
 

Disk Space Becomes Low Again

Recurring low space usually indicates an underlying source, such as:

  • Growing personal files
  • Large or unused applications
  • Update or application caches
  • Crash dumps
  • Cloud files configured to remain locally available
  • Log files generated by a malfunctioning application
  • Malware or corrupted application data
  • Insufficient storage capacity

Use Windows Storage settings to identify the expanding category. If unexpected data continues to grow, investigate the application or service producing it rather than repeatedly deleting its files.

FAQ

Frequently Asked Questions

Is Cleanmgr safe to use?

Yes, when you review the categories before confirming deletion. Take particular care with Downloads, Recycle Bin contents, offline files, previous Windows installations, Windows Update data, and crash dumps.

Does Cleanmgr delete personal files?

Most cleanup categories target temporary or system-managed data. However, categories such as Downloads and Recycle Bin can contain personal files. Always inspect those locations first.

Does Cleanmgr require administrator privileges?

Basic cleanup can run without elevation. Protected system-file categories and certain automated configurations may require an administrator account or credentials.

What is the difference between /sageset and /sagerun?

/sageset:n selects and saves cleanup categories under profile number n. /sagerun:n runs the categories saved under that same number.

Can Cleanmgr clean only the C drive?

Interactive cleanup can target C with:

 
cleanmgr /d C:
 

However, Microsoft states that /sagerun enumerates all drives, and /d is not used with /sagerun.

Can Cleanmgr be run silently?

Microsoft documents /verylowdisk as running with default settings and no user prompts. A saved /sagerun profile is also suitable for scheduled category-based cleanup, but it must be configured and tested carefully.

Will Cleanmgr improve computer performance?

It can help when critically low storage is disrupting updates, applications, or normal Windows operation. It is not a general performance optimizer, and cleaning an adequately provisioned drive may not produce a noticeable speed improvement.

Is Cleanmgr better than Storage Sense?

Neither option is universally better. Cleanmgr is useful for manual cleanup and reusable command-line profiles. Storage Sense is better suited to ongoing automated storage management on current Windows versions.

Can deleted Cleanmgr files be recovered?

Cleanmgr deletion should be treated as permanent. Files removed from cleanup categories are not intended to be recoverable through the Recycle Bin. Back up important data and review sensitive categories before proceeding.

FINAL RECOMMENDATION / CONCLUSION

Use Cleanmgr for controlled, category-based cleanup when you need to recover disk space manually or through a tested Task Scheduler profile. Start with temporary files, thumbnails, and other clearly disposable caches. Review the Recycle Bin and Downloads folder, retain diagnostic dumps while troubleshooting, and remove previous Windows installations only after confirming that rollback is unnecessary.

For routine maintenance on Windows 11, use Storage Sense or Cleanup recommendations alongside Cleanmgr. If storage repeatedly fills up, identify the application, personal data, logs, or system process responsible instead of relying on repeated cleanup alone.

 

#Cleanmgr #DiskCleanup #Windows11 #Windows10 #WindowsServer #StorageCleanup #FreeDiskSpace #TemporaryFiles #StorageSense #WindowsCommands #CommandPrompt #SystemMaintenance #TaskScheduler #WindowsUpdateCleanup #ITSupport #WindowsAdministration

SOURCES

 

YOUR FEEDBACK

Was this guide useful?

Your answer helps us keep BISONKB accurate and practical.

THE BISON BRIEF

Practical IT knowledge, once a week.

New troubleshooting guides, scripts and infrastructure notes. No noise.

By subscribing, you agree to our privacy policy.