A practical guide to reducing the size of C:\Windows\WinSxS without breaking Windows Update, system recovery, or component servicing.
WinSxS stands for Windows Side-by-Side. It is the Windows component store located at C:\Windows\WinSxS. Windows uses this folder to store system components, update files, optional features, language resources, and files required for repairing or servicing the operating system.
The WinSxS folder is not a normal cache folder. It is part of the Windows servicing architecture. Windows Update, optional Windows features, DISM repair operations, and system file recovery can all depend on files stored in this location.
C:\Windows\WinSxS and delete files manually. Manual deletion can break Windows Update, DISM, SFC, optional features, and future cumulative updates.
The correct way to clean WinSxS is to use built-in Windows servicing tools: DISM, Task Scheduler, Disk Cleanup, or Storage Sense. These tools remove only superseded components that Windows no longer needs.
WinSxS may look very large in File Explorer, but the reported size is often misleading. The component store uses hard links, which means some files appear to exist in multiple locations while actually sharing the same data on disk. Because of this, File Explorer can overestimate the real amount of space used by WinSxS.
However, WinSxS can still grow over time. The most common reasons are cumulative updates, feature updates, language packs, optional features, and older versions of system components kept temporarily for rollback or servicing.
| Reason | What It Means | Can Cleanup Help? |
|---|---|---|
| Windows cumulative updates | Old component versions remain after new updates are installed. | Yes, DISM can remove superseded components. |
| Feature updates | Windows keeps rollback and servicing files after major upgrades. | Yes, after the rollback period or with cleanup tools. |
| Optional Windows features | Components for features such as .NET Framework, Hyper-V, or language packs may be stored. | Partly, depending on installed features. |
| Hard links | Explorer may count the same data more than once. | No; this is a reporting issue, not wasted space. |
Cleaning WinSxS is safe when done with built-in tools, but it is still a system-level operation. Before running cleanup commands, use this short checklist.
/ResetBase./StartComponentCleanup first. Use /ResetBase only when you understand that it prevents uninstalling already superseded updates.
Before cleaning anything, check the component store status. The DISM analysis command shows the real component store size, the number of reclaimable packages, and whether cleanup is recommended.
Command Prompt / PowerShellDism.exe /Online /Cleanup-Image /AnalyzeComponentStore
Look for these lines in the output:
/AnalyzeComponentStore does not change the system. It only reports the current state of the Windows component store.
The recommended command-line cleanup method is /StartComponentCleanup. It removes superseded component versions that Windows no longer needs, while preserving normal servicing functionality.
Recommended DISM cleanup commandDism.exe /Online /Cleanup-Image /StartComponentCleanup
How to use it:
Enter.Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore again to compare the result.This is the best option for most users because it reduces WinSxS size without aggressively locking the current update state.
The /ResetBase option removes all superseded versions of every component in the component store. It can reclaim additional disk space, but it also has an important limitation: after using it, you cannot uninstall the already superseded updates that were cleaned up.
Advanced DISM cleanup commandDism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase
/ResetBase only on a stable system. If a recent update caused problems and you may need to uninstall it, do not run this command yet.
Recommended use cases for /ResetBase:
For everyday home PCs, standard /StartComponentCleanup is usually enough. Use /ResetBase as an optional advanced step, not as the first cleanup attempt.
Windows includes an automatic maintenance task called StartComponentCleanup. It runs in the background during system maintenance, but you can also start it manually.
Win + R, type taskschd.msc, and press Enter.Run scheduled cleanup taskschtasks.exe /Run /TN "\Microsoft\Windows\Servicing\StartComponentCleanup"
This method is conservative and uses Windows scheduled servicing behavior. If you want faster and more direct cleanup, use the DISM command from the previous section.
Disk Cleanup can remove old Windows Update files, including superseded update components stored through the component store. This is a good graphical option if you do not want to use commands.
Win + R, type cleanmgr, and press Enter.On Windows 10 and Windows 11, Storage Sense can automatically remove temporary files and some obsolete update-related files. It is not a direct replacement for DISM, but it is useful for regular maintenance.
To automate routine cleanup, enable Storage Sense on the Storage page and configure how often Windows should clean temporary files.
Because WinSxS is a protected system folder, deleting files from it manually is one of the fastest ways to corrupt Windows servicing. Even if the files appear old or duplicated, Windows may still use them through hard links or component manifests.
| Action | Risk | Safe Alternative |
|---|---|---|
Deleting files from C:\Windows\WinSxS |
Windows Update, DISM, and SFC may fail. | Use Dism.exe /StartComponentCleanup. |
| Using third-party βsystem cleanerβ tools on WinSxS | Cleaner may remove files it does not understand. | Use Microsoft servicing tools only. |
| Taking ownership of WinSxS to force deletion | Permissions and servicing metadata can be damaged. | Leave ownership and permissions unchanged. |
| Compressing the entire WinSxS folder manually | Performance issues or servicing failures are possible. | Free space with DISM, Disk Cleanup, or Storage Sense. |
If DISM cleanup fails, gets stuck, or reports component store corruption, use the following commands in order. Run them from an elevated Command Prompt, PowerShell, or Terminal window.
Dism.exe /Online /Cleanup-Image /ScanHealth
Scans the component store for corruption. This can take several minutes.
Dism.exe /Online /Cleanup-Image /RestoreHealth
Attempts to repair the Windows image using Windows Update or configured repair sources.
sfc /scannow
Verifies protected Windows system files and replaces corrupted files when possible.
| Problem | Possible Cause | What to Try |
|---|---|---|
| DISM stays at 20% or 40% | Normal DISM behavior or a slow disk. | Wait. Do not close the window unless there is no disk or CPU activity for a long time. |
| Cleanup fails after Windows Update | Pending reboot or unfinished servicing operation. | Restart Windows and run the command again. |
/AnalyzeComponentStore still recommends cleanup |
Some packages are still pending or reserved. | Restart, install pending updates, then repeat the cleanup. |
| DISM reports source files could not be found | Windows image repair needs a valid repair source. | Use Windows Update, a matching ISO image, or a mounted install.wim/install.esd source. |
Dism.exe /Online /Cleanup-Image /StartComponentCleanup is the standard safe cleanup command. It removes superseded component versions that Windows servicing no longer needs. The more aggressive /ResetBase option is also supported, but it prevents uninstalling already superseded updates.
The safest and most effective way to clean the WinSxS folder is to use the built-in Windows servicing tools. Start by analyzing the component store, then run the standard DISM cleanup command. Use /ResetBase only if the system is stable and you do not need to uninstall superseded updates.
Check real WinSxS size: Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore
Recommended cleanup: Dism.exe /Online /Cleanup-Image /StartComponentCleanup
Advanced cleanup: Dism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase
GUI method: Disk Cleanup β Clean up system files β Windows Update Cleanup
Never do: manually delete files from C:\Windows\WinSxS