Safely reduce the size of the WinSxS folder
C:\Windows\WinSxS is taking up a lot of space on a server or PC. Shrink it with the built-in component cleanup. Never delete it by hand.
- Windows 10
- Windows 11
- Server 2016
- Server 2019
- Server 2022
- Server 2025
The WinSxS folder (the component store) holds the files Windows needs to install, repair and uninstall updates. It looks bigger than it is, and deleting files from it can stop Windows booting or updating. Use the supported cleanup instead.
Symptoms
- The C: drive on a server is nearly full, and WinSxS appears to be many gigabytes.
- Updates fail for lack of space.
Cause
Windows keeps previous versions of updated components for a while so updates can be uninstalled. Explorer also over-reports the folder’s size, because many files are hard links shared with C:\Windows\System32.
Fix
1. Measure the real size
In an elevated prompt:
Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore
Look at Actual Size of Component Store and Component Store Cleanup Recommended.
2. Run component cleanup
Dism.exe /Online /Cleanup-Image /StartComponentCleanup
This removes superseded components immediately, without the 30-day wait the scheduled task uses. Updates already installed can still be uninstalled.
3. Optional: reset the base
Dism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase
This frees the most space, but every update currently installed becomes permanent: you can no longer uninstall them. Only do this once the server has been stable on its current updates.
4. Run Disk Cleanup for the rest
Run cleanmgr, select Clean up system files, and tick Windows Update Cleanup along with temporary files. See also Free up disk space.
If that didn’t work
- If DISM reports corruption, run
Dism.exe /Online /Cleanup-Image /RestoreHealth, thensfc /scannow. - The C: drive may simply be too small for the server’s role. Check for large logs, old profiles and application data elsewhere on C:.
When to call us
- A server’s system drive is critically full and services are failing.
- You need the C: volume expanded on a physical or virtual server.
Sources
Didn’t fix it? We can take a look.
Open a ticket