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
- Storage Sense — Settings > System > Storage, Storage Management section. Turn on automatic cleaning: it runs on a schedule, includes Windows Update leftovers, and can take an age window (default 30 days) to temp files and the Recycle Bin. Room to play with: fine-tune the toggles, do not disable it entirely.
- User temp —
%LocalAppData%\Temp(open it with Win+R). Delete the contents, not the folder. Installer and app debris ends up here; files in use are skipped with an error you can ignore. - System temp —
C:\Windows\Temp(as admin). Same rule: contents, not the folder. Best run after a reboot, while nothing is installing. - Disk Cleanup — search
cleanmgr, then Clean up system files for the second, larger list — update leftovers, old drivers, Delivery Optimization and thumbnail caches. - Windows Update cleanup — through Storage Sense, Disk Cleanup with the system-files view, or DISM (below). Same managed store, same managed path: never reach for it as a folder.
- Downloads — Settings > System > Storage > Cleanup recommendations: review by age and size before deciding. User data, never automatic.
- Browsers — cache and history come out through each browser's own settings, or Storage Sense's app-tracking where enabled.
Task by task
| Task | Where / command | Approx effect |
|---|---|---|
| Storage Sense auto-cleanup | Settings -> System -> Storage | Typically safe to keep on; clears aged temp files and update leftovers on its schedule |
| Recycle Bin | Storage Sense or Desktop -> Empty Recycle Bin | Safe; space depends on the age window configured — an age limit beats never emptying it |
| %LocalAppData%\Temp contents | explorer %TEMP% (Win+R) | Typically safe while apps are closed; files in use simply do not delete |
| C:\Windows\Temp contents | admin prompt, delete as admin | Typically safe after a reboot; service-locked leftovers can remain — no problem |
| Disk Cleanup system files | cleanmgr.exe -> Clean up system files | Typically safe; includes Windows Update cleanup and old installations |
| Component store cleanup | DISM /Online /Cleanup-Image /StartComponentCleanup | Typically safe; fast cleanup without /ResetBase keeps update uninstall capability |
| Full component store reset | DISM /Online /Cleanup-Image /StartComponentCleanup /ResetBase | Safe cleanup but irreversible: existing updates can no longer be uninstalled after it |
| Remove hibernation file | powercfg /hibernate off (elevated) | Removes hiberfil.sys from disk; disables hibernation and Fast Startup with it |
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
/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
- Do not delete the
WinSxSfolder or anything inside it. Microsoft's warning is blunt: manual deletion of WinSxS files can leave the system unable to boot or update. The component store is DISM's job. - Do not run third-party 'WinSxS slimmer' or 'reg fix clean' scripts: the documented DISM path is covered here.
- Do not delete
C:\Windows\System32contents,System Volume Information, or$Windows.~BTwhile an update is pending — those are checked by servicing, not by us.
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.
Related tools
- IPv4 subnet calculator — break any CIDR block into network, range, broadcast and usable hosts.
- IP range to CIDR — turn an arbitrary address range into its minimal covering CIDR blocks.
- VLSM calculator — split a block into right-sized subnets by host requirements.