Skip to the content
The Update Bureau
Guide · Release Cycle & Packages Disk cleanup Windows 11 & 10

How to reclaim disk space after Windows updates

Safely clean up old update files in the WinSxS folder and remove Windows.old after a version upgrade, without breaking Windows.

After a year of updates, a Windows PC can lose several gigabytes to update leftovers. Most of it sits in two places: the component store (C:\Windows\WinSxS) and, after a version upgrade, the Windows.old folder. Both can be cleaned safely with tools built into Windows. Doing it by hand with File Explorer is not safe.

Why WinSxS keeps growing

WinSxS is the component store: it holds every system file Windows needs to repair itself, install features and uninstall updates. When a monthly update replaces a file, Windows keeps the older version for a while so you can uninstall the update or roll back. Each cumulative update therefore adds to the folder before the old versions are removed.

Two things to know:

  • The size File Explorer shows for WinSxS is misleading, because many files in it are hard links to the same files in other folders, and are counted twice. The real extra space is smaller than it looks.
  • Never delete files from WinSxS by hand and never take ownership of the folder to empty it. Microsoft warns that doing so can leave Windows unable to start or to install updates. Use the tools below, which remove only what is no longer needed.

Windows already cleans the store on its own: a scheduled task called StartComponentCleanup runs when the PC is idle and removes older versions of components that were replaced at least 30 days ago. The steps below simply do the same sooner.

Clean up from Settings

This is the safest option and it works for everyone.

  1. Open Settings › System › Storage.
  2. Select Temporary files and wait for the list to load.
  3. Tick Windows Update Cleanup to remove superseded update files, and Previous Windows installation(s) to remove Windows.old.
  4. Select Remove files. It may take a few minutes and may ask for a restart.

Don't tick items you do not recognise, and check Downloads and Recycle Bin before you remove them: those are your own files.

About Windows.old

After a feature upgrade, Windows keeps the previous version in C:\Windows.old so you can go back from Settings › System › Recovery. Windows deletes it by itself after 10 days. If you remove it earlier, the Go back option disappears and you cannot return to the earlier version without reinstalling. Only remove it when the upgraded PC works well.

On Windows 10 the same cleanup is under Settings › System › Storage › Temporary files, or use Disk Cleanup (cleanmgr) and select Clean up system files.

Clean up with DISM (administrators)

Open Terminal or Command Prompt as administrator.

1. See what can be recovered

Command Prompt (Admin)
> DISM.exe /Online /Cleanup-Image /AnalyzeComponentStore

The report shows the real size of the store, the number of reclaimable packages and whether Component Store Cleanup Recommended is Yes. If it says No, there is nothing worth doing.

2. Remove superseded versions

Command Prompt (Admin)
> DISM.exe /Online /Cleanup-Image /StartComponentCleanup

This removes the previous versions of updated components immediately, without waiting for the 30 days that the scheduled task uses, and without the time limit the task has. It is safe: the current updates remain uninstallable. Restart afterwards if Windows asks.

3. Optional: reset the base with /ResetBase

Command Prompt (Admin)
> DISM.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase

/ResetBase removes all superseded versions of every component, so it recovers the most space. The price is that you can no longer uninstall any update that is installed now. Updates installed later can still be removed. Use it only on a PC that is stable and fully updated, and not right after installing an update you are not sure about. Don't use it if you may need to roll back: uninstall a doubtful update first, and run /ResetBase only once you are sure.

If the disk is still full afterwards, open Settings › System › Storage to see what really takes the space, such as apps, temporary files or the hibernation file.

If the cleanup does not free space

If /AnalyzeComponentStore reports damage or the commands fail, the component store may need repair first: see How to fix a Windows update that fails or gets stuck.

Edited by the site editor. Written with AI from Microsoft's own documents, checked by rules and a second AI. How we work · Report a mistake