Windows 11 maintenance & cleanup cheat sheet

Maintenance on Windows 11 is mostly knowing where the switch lives and which command is honestly safe to run. This sheet lists the cleanups that are typically safe and never deletes system files directly — the two operations that free real space (component store cleanup, hibernate removal) are done through the documented tools.

A standing rule: no cleanup here deletes anything WinSxS. The component store is serviced by DISM, never by the file system. Where a step could be irreversible, the sheet says so explicitly — the honest phrase is typically safe, because no cleanup is a free lunch and space recovered varies with the machine's history.

The safe cleanups

Routine behavior, in order of how often to look at them

Task by task

Each row marks where the switch or command lives; effect wording is deliberately approximate — Windows varies, no honest number fits all machines.
TaskWhere / commandApprox effect
Storage Sense auto-cleanupSettings -> System -> StorageTypically safe to keep on; clears aged temp files and update leftovers on its schedule
Recycle BinStorage Sense or Desktop -> Empty Recycle BinSafe; space depends on the age window configured — an age limit beats never emptying it
%LocalAppData%\Temp contentsexplorer %TEMP% (Win+R)Typically safe while apps are closed; files in use simply do not delete
C:\Windows\Temp contentsadmin prompt, delete as adminTypically safe after a reboot; service-locked leftovers can remain — no problem
Disk Cleanup system filescleanmgr.exe -> Clean up system filesTypically safe; includes Windows Update cleanup and old installations
Component store cleanupDISM /Online /Cleanup-Image /StartComponentCleanupTypically safe; fast cleanup without /ResetBase keeps update uninstall capability
Full component store resetDISM /Online /Cleanup-Image /StartComponentCleanup /ResetBaseSafe cleanup but irreversible: existing updates can no longer be uninstalled after it
Remove hibernation filepowercfg /hibernate off (elevated)Removes hiberfil.sys from disk; disables hibernation and Fast Startup with it
The hibernation file is only removed through powercfg /hibernate off — do not delete hiberfil.sys manually. Its companion behavior: Fast Startup (hiberboot) uses the same hiberfile, so this switch disables that too, which is why the process sleeps slightly slower afterwards. Verify with powercfg /availablesleepstates and turn it back on with powercfg /hibernate on.

Where the space goes and why

DISM's component store holds superseded versions of updated components — that is what /StartComponentCleanup shrinks. Added in Windows 10 and never removed, its behavior is identical on 11: left alone, Windows removes old components internally after a 30-day grace period; the same run from DISM deletes them immediately and without the Task Scheduler's one-hour cap. Only /ResetBase sharpens it to removing all superseded versions — Microsoft's own warning for that flag: existing update packages can no longer be uninstalled, but future ones are unaffected.

Never do these

FAQ

Is it safe to delete everything in Temp?

Mostly, yes — that is why it is the single safest win. Delete the contents of %LocalAppData%\Temp (per-user) and C:\Windows\Temp (admin), not the folders themselves. Files that are open or locked simply refuse to delete; checking the box for all without notification and re-running after reboot gets the rest. What you can never do is delete the WinSxS folder or system32 contents — those are serviced by DISM and Windows Update, not by deletion.

Can I delete the WinSxS folder to save space?

No — never manually. Microsoft's docs state that deleting files from the WinSxS folder can severely damage the system, up to making the PC unable to boot or update. The supported way of reducing the component store is DISM /Online /Cleanup-Image /StartComponentCleanup, with /ResetBase for the full sweep, both run from an elevated prompt.

What exactly does DISM /StartComponentCleanup /ResetBase do?

It removes every superseded component version from the store and compresses the rest. Left as-is Windows would do the same after a 30-day grace period and in smaller chunks; the DISM run does it immediately and completely. Trade-off: after /ResetBase you cannot uninstall updates that were already installed — future updates are unaffected.

Is hiberfil.sys fine to delete directly?

No. The file is only managed through powercfg: powercfg /hibernate off disables hibernation and removes it, verified with powercfg /availablesleepstates; powercfg /hibernate on restores both. Deleting it behind the system's back either fails (the file is protected) or unbinds it, and Fast Startup — which reuses this hiberfile when you shut down — stops working properly.