Windows.old and WinSxS: what you can delete and what to leave alone
By Bhavik · Sources checked October 3, 2026
Two folders on a Windows drive look huge and make people reach for the delete key: Windows.old and C:\Windows\WinSxS. You can remove one of them from Settings. The other you should never delete by hand, though it is smaller than it looks and there is a built-in command to trim it.
Windows.old
Windows.old holds the files from your previous version of Windows, so you can roll back after an upgrade. Windows deletes it by itself ten days after the upgrade (Microsoft Support).
If you want the space back sooner and you are sure everything works, remove it from Settings:
- Open Settings, then System, then Storage.
- Under your drive, select Temporary files.
- Tick Previous version of Windows, then select Remove files.
WinSxS
WinSxS is the component store. Windows keeps the pieces it is made of here, so it can roll back updates and repair damaged files. A lot of those files also show up elsewhere in Windows, but there is usually only one real copy and the rest are hard links. File Explorer does not account for that when it adds up folder sizes, so WinSxS looks bigger than it is (Microsoft Learn).
Step 1: check the real size
Open Command Prompt as administrator and run:
Dism.exe /Online /Cleanup-Image /AnalyzeComponentStoreThe output shows the size Explorer reports, the real size, and the overhead, which is "Backups and Disabled Features" plus "Cache and Temporary Data". It also tells you whether a cleanup is recommended (Microsoft Learn). In Microsoft's example, Explorer reports 4.98 GB and the real overhead is about 507 MB.
If yours says "Component Store Cleanup Recommended: No", there is not much to gain and you can stop here.
Step 2: run the cleanup
Windows already does this on its own through a scheduled task called StartComponentCleanup. It waits at least 30 days after an update before it removes the old version of a component, and Microsoft recommends not turning it off (Microsoft Learn). To run it now, from an administrator Command Prompt:
Dism.exe /online /Cleanup-Image /StartComponentCleanupIt does the same job as the scheduled task, but old versions go immediately, with no 30-day wait and no one-hour time limit (Microsoft Learn).
There is also a stronger option:
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase/ResetBase removes every superseded version of every component. Once it finishes, you can't uninstall any of the updates that are already installed (future ones are fine). Unless you really need the space, skip it (Microsoft Learn).Disk Cleanup's system file cleanup also has an update cleanup option that shrinks the component store (Microsoft Learn, Disk Cleanup in Windows).
Let Storage Sense do the routine stuff
Storage Sense is under Settings, System, Storage, and it is off by default. Once it is on, it runs when you are low on disk space. It can clear temporary files, empty the Recycle Bin, clean old Downloads if you choose, and remove previous Windows installs. It only works on the C: drive, and only after you have been signed in and online for more than 10 minutes (Microsoft Support).
Quick reference
| Item | Delete by hand? | How to reclaim the space |
|---|---|---|
| Windows.old | No, use Settings | Settings > System > Storage > Temporary files > Previous version of Windows. You can't undo it, and you lose the option to roll back. |
| WinSxS folder | Never | Dism.exe /online /Cleanup-Image /StartComponentCleanup from an administrator prompt. |
| Superseded updates | Never | /StartComponentCleanup /ResetBase, only if you accept that installed updates can no longer be uninstalled. |
| Temporary files, Recycle Bin | Yes | Storage Sense, or Settings > System > Storage > Temporary files. |
Still full afterwards?
Both of these are Windows system files, so stick to the Microsoft tools above. If the drive is still full, on a developer machine it is usually something else: a WSL2 virtual disk that never shrinks, Docker Desktop's disks, package caches or node_modules folders. SpaceFree measures those and tells you what is safe to remove. Download SpaceFree.
Sources
Find hidden disk space automatically
SpaceFree scans for WSL2 and Docker virtual disks, package caches, node_modules and build output, and shows what is safe to delete. Free for 7 days, no credit card.
Download SpaceFree for Windows