What is WinSxS?
WinSxS (short for Windows Side-by-Side) is the official Windows Component Store, located at C:\Windows\WinSxS. It acts as the core file repository for the Windows operating system.
Instead of keeping system files scattered across various directories, Windows stores the master copies of all system components, drivers, optional features, and updates inside WinSxS.
What WinSxS Is Used For
Side-by-Side Execution ("DLL Hell" Prevention):
It allows different applications to run different versions of the same system DLL or assembly simultaneously without overwriting or interfering with one another.
Windows Updates & Rollbacks:
When Windows installs an update, it adds the new version of a file to
WinSxSwhile preserving the old version. This allows you to safely uninstall updates if something goes wrong.Enabling/Disabling Windows Features:
Features like Hyper-V, IIS, or .NET Framework 3.5 can be enabled or disabled instantly without inserting installation media because the files are already staged in
WinSxS.System Repair:
Built-in repair commands like
sfc /scannowanddism /online /cleanup-image /restorehealthuseWinSxSas the reference folder to repair corrupt or missing system files.
Check if you need Cleanup
A. The DISM Command Line (Most Thorough)
Open PowerShell or Command Prompt as Administrator:
Analyze WinSxS to see actual reclaimable space:
DOSDism.exe /Online /Cleanup-Image /AnalyzeComponentStoreClean up superseded component versions:
DOSDism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase(Note: Using
/ResetBasepermanently commits installed updates and prevents you from uninstalling current updates, but yields the maximum disk space recovery).
How to Run the Cleanup
Run one of the following commands in an Elevated Command Prompt or Elevated PowerShell (Run as Administrator):
Option 1: Standard Recommended Cleanup (Safe & Reversible)
Removes superseded components while keeping the ability to uninstall recent Windows Updates if needed:
Dism.exe /Online /Cleanup-Image /StartComponentCleanup
Option 2: Maximum Space Reclamation (/ResetBase)
Purges all older versions of components completely. This yields the maximum possible disk space savings, but removes the ability to uninstall currently installed Windows Updates:
Dism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase
What to Expect
The process can take anywhere from 5 to 20 minutes depending on your CPU and drive speed.
It may appear to pause at certain percentage marks (like 10% or 20%)—this is normal while it processes hard links and file references in the background.