The C drive fills up and Windows starts complaining, but deleting folders blindly is the fastest way to break the system. This guide shows what really takes space, what can be cleaned with Windows’ own tools and what should never be touched by hand.
In short
- Start with Settings › System › Storage to see what takes space and use the cleanup recommendations.
- Disk Cleanup with Clean up system files and
DISM /StartComponentCleanuprecover gigabytes of old updates safely.- Never manually delete WinSxS, pagefile.sys or Windows.old: there is an official way for each.
First, see what takes space
Before cleaning anything, find the problem. Often it is not Windows but a forgotten downloads folder or phone videos.
- Open Settings › System › Storage.
- Wait for it to finish calculating and click Show more categories.
- Open each category: Installed apps, Temporary files, Documents, Other…
To find which folders in your user profile weigh most, this PowerShell command sorts them by size:
Get-ChildItem $env:USERPROFILE -Directory -Force -ErrorAction SilentlyContinue |
ForEach-Object {
$bytes = (Get-ChildItem $_.FullName -Recurse -File -Force -ErrorAction SilentlyContinue |
Measure-Object Length -Sum).Sum
[pscustomobject]@{ Folder = $_.Name; GB = [math]::Round($bytes / 1GB, 2) }
} | Sort-Object GB -Descending | Select-Object -First 15
It takes a while on big folders. If the result points to AppData, the culprit is usually the cache of a browser, editing program or game.
Storage Sense: automatic cleanup
Storage Sense periodically deletes temporary files and empties the Recycle Bin. Find it under Settings › System › Storage › Storage Sense.
- Turn it on and choose how often it runs.
- Decide how many days files stay in the Recycle Bin.
- Check the Downloads option. By default it is Never, and keep it so if you keep things there you care about.
On Windows 11 the same Storage screen has Cleanup recommendations: large files, unused apps and cloud-synced files. Review them one by one; they are suggestions, not orders.
Disk Cleanup: clean up system files
The classic Disk Cleanup is still there and recovers the most space after a major update.

- Press
Windows + R, typecleanmgrand confirm. - Choose drive C:.
- Click Clean up system files. It scans again with admin rights and shows more options.
- Tick what to delete and click OK.
What each important option means:
| Option | What it is | Safe to delete? |
|---|---|---|
| Windows Update Cleanup | Old versions of replaced components | Yes. Afterwards you cannot uninstall those updates |
| Previous Windows installation(s) | The Windows.old folder | Yes, if you will not go back |
| Temporary files | Leftovers programs did not clean | Yes |
| Delivery Optimization Files | Cache for sharing updates with other PCs | Yes |
| Windows upgrade log files | Installation logs | Yes, unless troubleshooting |
| Downloads | Your whole Downloads folder | Only if you know what is inside |
| Recycle Bin | What you already binned | Yes, check first |
The Downloads box is the usual trap: it sits next to harmless options and deletes everything there.
WinSxS: large, but never delete by hand
The C:\Windows\WinSxS folder holds system components and previous versions. File Explorer shows it huge, but it exaggerates: many files are hard links that also appear in C:\Windows\System32, so they are counted twice.
Deleting WinSxS files by hand can leave Windows unable to update, repair components or even boot. The right way is DISM. Open Terminal as admin and analyze first:
Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore
The report shows the component store’s real size and whether cleanup is recommended. If yes:
Dism.exe /Online /Cleanup-Image /StartComponentCleanup
It can take several minutes and seem stuck at a percentage. Let it finish.
There is a more aggressive version:
Dism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase
/ResetBase removes all superseded versions. You gain a bit more, but you can no longer uninstall any update installed so far. Use it only if the system has been stable for a while.
hiberfil.sys and pagefile.sys
Two hidden files at the root of C: that can take many gigabytes. They work differently and are handled differently.

hiberfil.sys: the hibernation file
It stores memory contents when hibernating. Windows Fast startup also uses it at every shutdown. By default it takes about 40% of RAM, so on a 32 GB machine about 13 GB.
If you do not use hibernation, disable it from an admin console:
powercfg /hibernate off
The file disappears immediately. Note that Fast startup is also disabled, so cold boot may be a bit slower. To undo, powercfg /hibernate on.
There is a middle ground: powercfg /h /type reduced shrinks the file, keeps Fast startup and disables only hibernation.
pagefile.sys: virtual memory
The paging file. Windows uses it when RAM is not enough and to save memory dumps on blue screens. Do not disable it: some apps fail without it and you lose crash info.
If it takes too much, limit it:
- Press
Windows + Rand typesysdm.cpl. - Go to Advanced › Performance › Settings › Advanced › Virtual memory › Change.
- Untick automatic management, choose Custom size and set a reasonable minimum and maximum.
On most home computers it is wisest to leave it automatic.
Restore points
System Protection keeps restore points that can take several gigabytes. They are useful, so do not delete them all without thinking.
- To limit space:
Windows + R,SystemPropertiesProtection, select C:, Configure and set Max Usage. 3% to 5% of the disk is usually enough. - To delete all but the newest: in Disk Cleanup, after Clean up system files, More Options tab › System Restore and Shadow Copies › Clean up.
To see how much they take now:
vssadmin list shadowstorage
Windows.old
After a feature update, Windows keeps the previous installation in C:\Windows.old so you can roll back. After about 10 days the system removes it itself.
To reclaim that space sooner, if you are sure you will not go back, delete it from Settings › System › Storage › Temporary files › Previous Windows installation(s) or Disk Cleanup.
Do not try deleting it in File Explorer: permissions block it and forcing them can leave it half deleted.
What never to touch
| Path or file | Why |
|---|---|
C:\Windows\WinSxS | Use DISM; manual deletion breaks updates |
C:\Windows\Installer | Needed to repair and uninstall programs |
C:\Windows\System32 | It is the system |
pagefile.sys | Limit it, do not delete or disable |
C:\ProgramData | Program settings and licenses |
C:\System Volume Information | Restore points; manage from System Protection |
Common mistakes
- Ticking Downloads in Disk Cleanup thinking they are temporary.
- Using “cleaners” that touch the registry. The registry takes no meaningful space and bad cleanup causes more problems than it solves.
- Running
/ResetBaseright after an update you do not yet trust. - Disabling virtual memory on low-RAM machines and getting unexpected crashes.
- Not restarting after cleanup. Some update files are freed only after reboot.
- Chasing 2 GB in the system when the videos folder takes 200. Always see what takes space first.



