The Safe Order to Delete Windows.old, Hiberfil and Temp Files
Short answer
Work in this order: temporary files first (no cost), then Windows Update cleanup, then Windows.old once the machine has been stable for a week, and only then consider hiberfil.sys. Use Settings → System → Storage → Temporary files for the first three rather than deleting by hand — Windows selects only what is genuinely safe, and the files it skips are skipped for a reason.
On this page
There are four large things on a Windows system drive that people are told to delete, and they are not equivalent. One is free to remove, one costs you a rollback option, one costs you a feature, and one should usually be left alone entirely.
Doing them in the wrong order is how someone deletes Windows.old on day three,
discovers on day five that the update broke their printer, and finds the
rollback option has gone.
What each one costs
| File or folder | Typical size | What you lose | Verdict |
|---|---|---|---|
| Temp files, update cache | 1–10GB | Nothing | Delete freely |
C:\Windows.old |
15–30GB | Update rollback | Delete after a week |
hiberfil.sys |
40–75% of RAM | Hibernation, fast startup | Only if you never hibernate |
pagefile.sys |
2–16GB | Stability under memory pressure | Leave alone |
That last row is the one worth stating plainly. Disabling the page file to reclaim a few gigabytes causes out-of-memory errors under load and stops crash dumps being written. The space is not worth it.
Step 1 — temporary files
Start here every time. Nothing is lost and it is often several gigabytes.
Settings → System → Storage → Temporary files. Windows presents a tick list with sizes. Work through it:
Safe, tick everything here:
- Temporary files — leftovers from installers and applications.
- Delivery Optimisation Files — cached update parts shared with other PCs.
- Thumbnails — regenerated automatically when needed.
- Microsoft Defender Antivirus — old definition files.
- Temporary Internet Files — browser cache for Edge and Internet Explorer components.
Decide deliberately:
- Recycle Bin — deleting here is permanent. Check it first.
- Downloads — contains files you may still want. Windows includes this and people tick it without reading.
Windows Update Cleanup is the largest single item after a feature update, often 3–8GB of superseded component versions. Safe to remove; it just means a larger download if Windows ever needs to reinstall a component.
If the drive fills again within weeks, the cleanup was not the problem — a C drive that keeps filling up after cleaning covers finding what is writing continuously.
Step 2 — the component store
C:\Windows\WinSxS looks enormous in any folder-size tool, frequently 10–15GB.
Most of that is an illusion: it is full of hard links, and size tools count the
same file once per link.
Never delete anything inside WinSxS by hand. It holds the files Windows uses to repair and service itself, and removing them breaks updates in ways that are difficult to reverse.
The supported reduction is the component cleanup, which removes superseded versions only. In Terminal (Admin):
DISM /Online /Cleanup-Image /StartComponentCleanup
Allow 10–20 minutes. It typically recovers a few gigabytes after a feature update and almost nothing on a freshly installed machine.
There is a /ResetBase variant that recovers more by discarding all superseded
components permanently. The cost is that you can no longer uninstall any
previously installed update. Use it only if you are short of space and the
machine has been stable for a long time.
Step 3 — Windows.old
This is your previous Windows installation, kept after a feature update so you can roll back. It is 15–30GB and Windows deletes it automatically after ten days.
Wait at least a week before removing it manually. That window exists because feature updates break things — a printer driver, a VPN client, an audio device — and the rollback is the clean fix. Deleting the folder ends the rollback option immediately and permanently, and the greyed-out Go back button in Settings is how most people discover this.
Once you are confident the machine is behaving:
Settings → System → Storage → Temporary files → tick Previous Windows installation(s) → Remove files.
Alternatively, Disk Cleanup with Clean up system files clicked exposes the same entry.
Do not delete the folder in File Explorer. Its permissions are set so that even an administrator cannot remove it normally, and the usual advice to take ownership and force deletion leaves orphaned entries behind. The supported route removes it completely.
Extracting a file from Windows.old before deleting it is reasonable — your old
user profile sits under Windows.old\Users\<name> and documents you thought
were lost in the upgrade are usually there. Copy anything you want out first.
What else lives in that folder is covered in
whether you can safely delete Windows.old.
Step 4 — hiberfil.sys
Only reach this step if the first three did not free enough, because it costs you a feature rather than just space.
hiberfil.sys holds the contents of RAM when the machine hibernates, so it is
sized relative to installed memory — typically 40% of RAM by default, which is
6.4GB on a 16GB machine. It also backs fast startup, which is why Windows 11
boots quickly from a full shutdown.
Removing it means no hibernation and no fast startup. Sleep continues to work normally.
On a desktop that never hibernates, this is a fair trade. On a laptop, hibernation is what lets you shut the lid on Friday and open it on Monday without a dead battery, and giving that up for 6GB is usually a poor deal.
To remove, in Terminal (Admin):
powercfg /hibernate off
The file disappears immediately. To restore it:
powercfg /hibernate on
A middle option keeps fast startup while shrinking the file, by reducing it to
the smaller size that only supports fast startup rather than full hibernation.
The powercfg hibernate command accepts a size parameter for this; check
Microsoft’s current documentation for the exact syntax rather than copying a
value from a forum.
Do not delete hiberfil.sys in File Explorer. It is in use, the deletion
will fail, and attempts to force it can leave the power configuration in an
inconsistent state. powercfg is the correct tool and it removes the file as
part of turning the feature off.
What to leave alone
pagefile.sys. Virtual memory. Removing it causes application failures under memory pressure and prevents crash dumps from being written, which matters precisely when something is going wrong. Full reasoning in whether hiberfil.sys or pagefile.sys are safe to delete.C:\Windows\WinSxScontents. Covered above.C:\$Recycle.Binby hand. Empty the Recycle Bin normally instead.- The recovery partition. A few hundred megabytes to 1GB, and it is what lets you reset the PC without installation media.
- System Restore’s shadow copies, unless you are deliberately giving up restore points. Reduce the allocation in System Properties → System Protection → Configure rather than deleting them individually.
Set it up to maintain itself
Once the one-off cleanup is done, Storage Sense handles the recurring part. Settings → System → Storage → turn it on, then open it to configure the schedule. Set the Recycle Bin to empty after 30 days and leave the Downloads option off unless you are certain.
It covers temporary files, the Recycle Bin and OneDrive cloud content. It does not touch application caches, logs, game installations or project files, which is where most recurring growth actually lives.
Realistic expectations
On a machine that has recently had a feature update, the full sequence typically
recovers 20–40GB: a few gigabytes of temporary files, several from the update
cleanup, and 15–30GB from Windows.old.
On a machine with no recent feature update, expect considerably less — perhaps 2–5GB, most of it temporary files and Defender definitions. If that is not enough, the space is going somewhere else, and a folder-size tool will find it faster than another round of cleanup.
The honest limit is that a 128GB or 256GB drive running Windows 11 is short of space by design, not by neglect. Windows itself plus a browser and a few applications leaves little room, and no amount of careful deletion changes that arithmetic. Moving large folders to a second drive, or replacing the drive, is the real answer there.