Windows repair
Clean up the WinSxS folder safely
Measure and reduce the component store with DISM. Never delete files from WinSxS by hand.
winsxsdisk-spacedism
C:\Windows\WinSxS looks huge in Explorer because most of it is hard links to files that also live in System32; the space is counted twice. Deleting files from it by hand breaks servicing and can make the system unbootable.
1. Measure the real size
powershell
1DISM /Online /Cleanup-Image /AnalyzeComponentStoreLook at Actual Size of Component Store and Component Store Cleanup Recommended.
2. Remove superseded components
powershell
1DISM /Online /Cleanup-Image /StartComponentCleanupWindows also runs this automatically through the scheduled task \Microsoft\Windows\Servicing\StartComponentCleanup.
3. Optional: make current updates permanent
powershell
1DISM /Online /Cleanup-Image /StartComponentCleanup /ResetBaseWarning: after
/ResetBasenone of the currently installed updates can be uninstalled. Only use it on a machine that's been stable on its current updates.
References
- Clean up the WinSxS folder — Microsoft Learn
- Determine the actual size of the WinSxS folder — Microsoft Learn