Skip to content

Storage Sense and Disk Cleanup: what is safe to delete

Verified 3 min read

Which cleanup targets are free space and which ones cost you something, how to run WinSxS cleanup, and what actually fills a modern drive.

Tested onPro (26H2) / Server · Build 26300.9457 / 26100.33650 · x64
E1
Build
26300.9457 / 26100.33650
Edition
Pro (26H2) / Server
Architecture
x64
Support
Documentation (E1)
Evidence
E1Official documentation
Verified
2026-10-29
Page type
Task

Three different cleanup mechanisms, three different risk levels:

Tool Frees Risk
Storage Sense temp files, recycle bin, old Downloads low, runs automatically
Disk Cleanup (cleanmgr) Windows Update leftovers, old installs, thumbnails low, but some items are one-way
WinSxS cleanup (/StartComponentCleanup) superseded component versions medium — no rollback after

The biggest wins are usually not in these tools: it is the 40GB of games, the 20GB of OneDrive cache, or the hibernation file.

Terminal window
Get-Volume | Select-Object DriveLetter,FileSystemLabel,@{n='SizeGB';e={[math]::Round($_.Size/1GB,1)}},@{n='FreeGB';e={[math]::Round($_.SizeRemaining/1GB,1)}}
Get-ChildItem $env:USERPROFILE -Directory -Force -ErrorAction SilentlyContinue |
ForEach-Object {
$s = (Get-ChildItem $_.FullName -Recurse -Force -File -ErrorAction SilentlyContinue | Measure-Object Length -Sum).Sum
[pscustomobject]@{ Folder = $_.Name; GB = [math]::Round($s/1GB,2) }
} | Sort-Object GB -Descending | Select-Object -First 10

This finds the real consumer before you start deleting system files.

Item Safe? Note
Temporary files yes apps recreate them
Recycle bin yes it is a bin
Downloads check first Storage Sense can delete them automatically
Thumbnails yes regenerated on demand
Delivery Optimisation files yes update cache
Windows Update cleanup yes removes old update packages
Previous Windows installation one-way no rollback after
WinSxS superseded components one-way see below
Hibernation file configurable disables hibernation/fast startup
Page file no managed by the system

C:\Windows\WinSxS is not a backup copy of Windows; it is the component store. It contains hard links to files that are in use, so its reported size is far larger than the space it really occupies.

Clean it with the supported command:

Terminal window
Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore
Dism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase
  • AnalyzeComponentStore tells you whether cleanup is worthwhile.
  • /ResetBase removes the ability to uninstall installed updates. Do not use it on a machine where you may need to roll back a bad patch.

Disk Cleanup (cleanmgr) without the guesswork

Section titled “Disk Cleanup (cleanmgr) without the guesswork”

Storage Sense is the automatic path. cleanmgr is the manual one, and it has two profiles that people mix up:

Mode Launches Shows
cleanmgr the standard profile user-level temp files only
Clean up system files the elevated profile Update leftovers, old installs, WinSxS

That second pass is the one with real reclaim, and the one that can cost you a rollback. Run it deliberately:

Terminal window
cleanmgr /lowdisk # pre-selects the biggest safe items
cleanmgr /sageset:11 # pick items once, stored under this number
cleanmgr /sagerun:11 # run those picks unattended later

/sageset writes its selection to the registry, so /sagerun can be scheduled. Two items deserve a decision rather than a default:

  • “Previous Windows installation(s)” — deleting Windows.old ends the 10-day window to go back to the old build. The system removes it automatically after that window; deleting early only saves time, not much space you will miss.
  • “Delivery Optimisation Files” — the local update cache. Safe, but it re-downloads on the next update.

hiberfil.sys is usually 40–100% of RAM. Removing it also removes Fast Startup and hibernate:

Terminal window
powercfg /hibernate off # deletes hiberfil.sys, disables fast startup + hibernate
powercfg /hibernate on # back on

If the machine is a desktop that never hibernates and has a small SSD, turning it off is a legitimate 8–32GB. On a laptop, think about it — see sleep, hibernate and Fast Startup.

Settings → System → Storage → Storage Sense: enable it, set Downloads cleanup to “never” if you use that folder, and let it run weekly.

E1. The cleanup commands are Microsoft-documented; no cleanup was run on the lab VMs for this page, so no freed-space figures are claimed.

Sources