Skip to content
GEEKnodes

Windows

Free Up Disk Space on Windows 11 and 10 Safely

Free up space on Windows 11 and 10 without risk: Storage Sense, system files, WinSxS with DISM, hiberfil.sys, Windows.old and what not to touch.

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 /StartComponentCleanup recover 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.

  1. Open Settings › System › Storage.
  2. Wait for it to finish calculating and click Show more categories.
  3. 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.

Disk Cleanup steps: cleanmgr, drive C:, Clean up system files and OK; careful with the Downloads box
Click Clean up system files and do not tick Downloads without looking.
  1. Press Windows + R, type cleanmgr and confirm.
  2. Choose drive C:.
  3. Click Clean up system files. It scans again with admin rights and shows more options.
  4. Tick what to delete and click OK.

What each important option means:

OptionWhat it isSafe to delete?
Windows Update CleanupOld versions of replaced componentsYes. Afterwards you cannot uninstall those updates
Previous Windows installation(s)The Windows.old folderYes, if you will not go back
Temporary filesLeftovers programs did not cleanYes
Delivery Optimization FilesCache for sharing updates with other PCsYes
Windows upgrade log filesInstallation logsYes, unless troubleshooting
DownloadsYour whole Downloads folderOnly if you know what is inside
Recycle BinWhat you already binnedYes, 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 takes about 40% of RAM and is removed with powercfg; pagefile.sys can be limited but not deleted
hiberfil.sys can be removed with powercfg; pagefile.sys only limited.

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:

  1. Press Windows + R and type sysdm.cpl.
  2. Go to Advanced › Performance › Settings › Advanced › Virtual memory › Change.
  3. 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 fileWhy
C:\Windows\WinSxSUse DISM; manual deletion breaks updates
C:\Windows\InstallerNeeded to repair and uninstall programs
C:\Windows\System32It is the system
pagefile.sysLimit it, do not delete or disable
C:\ProgramDataProgram settings and licenses
C:\System Volume InformationRestore 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 /ResetBase right 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.

Accessibility preferences

Quick profiles

Text and reading

Text size
Default
Line height
Default
Letter spacing
Default
Word spacing
Default

Colour

Motion and orientation

Cursor