Is the WinSxS Folder Really That Big, and Can You Clean It?
When you clean up drive C:, C:\Windows\WinSxS often shows several gigabytes, sometimes more than all of Program Files. It sits inside the Windows folder and resists deletion, so people ask whether it can be touched at all. It can, but only through Windows' own tools, and first you need to know how much of that number is real.
Why it looks so large
WinSxS is the component store. Windows keeps its components here, and it is what rollbacks after a bad update and repairs of damaged system files rely on. Microsoft's explanation covers why it looks big: many files appear to exist in both System32 and WinSxS, but the disk holds only one copy and the other location is a hard link. File Explorer and other tools that add up folder sizes do not account for hard links, so the same data is counted twice.
Measure the real overhead first
Open Command Prompt as administrator and run:
Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore
Read the lines of the output separately:
- Windows Explorer Reported Size of Component Store: the size File Explorer computes, without accounting for hard links.
- Actual Size of Component Store: the size with hard links accounted for, still including files shared with Windows.
- Shared with Windows: files that also appear elsewhere and that Windows needs to run, not overhead.
- Backups and Disabled Features and Cache and Temporary Data: together these are the component store's overhead, and they are what cleanup can affect.
- Component Store Cleanup Recommended: when it says Yes, cleanup is likely to reduce the overhead.
In Microsoft's example, File Explorer reports 4.98 GB while the actual overhead is about 507 MB. Measure before cleaning so you do not spend an afternoon on a number that is mostly shared files.
Do not delete it by hand
Microsoft's warning is explicit: deleting files from WinSxS, or deleting the whole folder, can leave the PC unable to start and unable to install updates, because some important system files exist only there. Taking ownership from TrustedInstaller to force the deletion ends the same way.
Clean up with DISM
Windows already cleans up on a schedule. The StartComponentCleanup task runs while the PC is idle, waits at least 30 days after an updated component is installed before removing the previous version, and stops after an hour. To clean up now, run:
Dism.exe /Online /Cleanup-Image /StartComponentCleanup
Microsoft's cleanup guide explains the difference from the scheduled task: previous versions of updated components are deleted immediately, with no 30-day grace period and no one-hour limit.
Adding /ResetBase goes further:
Dism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase
It removes all superseded versions of every component. Afterwards, updates that are already installed can no longer be uninstalled, while updates installed later are not affected. How much space comes back depends on the two overhead lines above, not on a fixed figure. Right after a large update, while you are not yet sure it is stable, leave this switch out.
| Command | What it removes | Can installed updates be uninstalled |
|---|---|---|
/StartComponentCleanup |
Superseded versions of updated components | Partially: the removed previous versions can no longer be rolled back |
/StartComponentCleanup /ResetBase |
All superseded versions | No |
Only /ResetBase makes every installed update permanently unremovable; plain /StartComponentCleanup deletes previous component versions immediately, so those specific updates lose their rollback path.
Without the command line
In Disk Cleanup, choose "Clean up system files" and select "Windows Update Cleanup". Microsoft's guide notes that this also reduces the component store. Whichever route you take, run the analysis again afterwards and compare: it is more accurate than the size File Explorer shows. To keep investigating other space, continue with Sorting out a full C: drive and Windows cache cleanup. For the system-wide temp folders and the Windows Installer cache, see temp folder cleanup and the Windows Installer folder.
FAQ
Can I delete the WinSxS folder?
No. Microsoft warns that deleting files from WinSxS can leave Windows unable to start or update. Use DISM cleanup instead.
Why does WinSxS look larger than the disk change?
Many files also appear in System32. Explorer counts both copies; the disk holds one. Use DISM /Online /Cleanup-Image /AnalyzeComponentStore for the actual size.
What does /ResetBase give up?
After it, every installed update can no longer be uninstalled. Updates installed later are not affected.
How do I clean it without the command line?
Disk Cleanup › Clean up system files › Windows Update Cleanup also reduces the component store; measure again afterwards.