sodcalculator

10 Tech How-To

Shrink WinSxS Folder in Windows 11 Safely

Guide 10-56759 · Updated · Step by step

This guide shows you how to reduce the size of the WinSxS folder (Component Store) in Windows 11 without breaking system updates or causing instability. You’ll learn which built-in tools are safe to use, which ones to avoid, and how to verify the results afterward.

What You’ll Need

  • An administrator account (you’ll need to approve UAC prompts).
  • At least 10–15 GB of free disk space temporarily (for the cleanup process to work smoothly).
  • A stable power connection – do not let your PC sleep or shut down during the steps.
  • Optional: a USB drive or external drive to back up important files before starting.

Step-by-Step

  1. Check the current size of the WinSxS folder. Open File Explorer, navigate to C:\Windows\WinSxS, right-click it, and select Properties. Note the size – it will likely be several gigabytes. (This is normal; the folder contains hard links to system files, so its “real” size is smaller than what Explorer shows.)
  2. Open an elevated Command Prompt. Click the Start button, type cmd, right-click Command Prompt, and select Run as administrator. Click Yes on the User Account Control prompt.
  3. Run the Component Store analysis. Type the following command and press Enter:
    Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore
    Wait for the analysis to complete. It will show whether the component store is “recommended” for cleanup and give you an estimate of how much space you can reclaim.
  4. If cleanup is recommended, run the cleanup command. Type:
    Dism.exe /Online /Cleanup-Image /StartComponentCleanup
    This removes superseded versions of components and old update files. It may take 10–30 minutes. Do not close the window or interrupt the process.
  5. Optionally, run the more aggressive cleanup with the /ResetBase switch. If you want to reclaim more space (and you are sure you will not need to uninstall any current updates), run:
    Dism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase
    This permanently removes all superseded versions of every component, so you cannot uninstall recent updates afterward. Only do this if you accept that trade-off.
  6. Run Disk Cleanup as a complementary step. Open the Start menu, type Disk Cleanup, and run it. Select the drive where Windows is installed (usually C:), click OK, then click Clean up system files. Check Windows Update Cleanup and any other categories you want, then click OK and confirm deletion.
  7. Verify the new size. Re-open the WinSxS folder Properties, or better, run the AnalyzeComponentStore command again. The “Actual Size” reported by DISM is the true footprint; compare it with the initial size to see the reduction.
  8. Restart your PC. Reboot to ensure all changes are applied cleanly. After restart, run Windows Update normally to confirm that future updates install without errors.

Common Mistakes

  • Deleting the WinSxS folder manually. This will break Windows entirely – the folder contains critical system files. Never delete it or its contents directly.
  • Using third-party “WinSxS cleaner” tools. Many are outdated or aggressive and can corrupt the component store. Stick with built-in DISM and Disk Cleanup.
  • Running /ResetBase when you still want to uninstall updates. Once you reset the base, you cannot remove previously installed updates. Only use it if you are certain.
  • Interrupting the DISM process. Closing the command window or shutting down mid-cleanup can leave the component store in an inconsistent state.
  • Expecting massive reductions. WinSxS typically shrinks by only a few gigabytes, not tens of gigabytes. If you need more space, look at other areas like hibernation file, pagefile, or user files.

Tips

  • Always run AnalyzeComponentStore first – it tells you if cleanup is even worth doing.
  • Schedule regular cleanups after major Windows updates, as those tend to leave the most superseded files.
  • Use Dism /Online /Cleanup-Image /StartComponentCleanup without /ResetBase for routine maintenance – it’s safe and reversible.
  • If you have a small SSD, consider moving your user folders (Documents, Downloads, etc.) to another drive to free up space instead of relying solely on WinSxS cleanup.
  • Keep your system updated – newer Windows 11 versions have better component store management, reducing the need for manual cleanup.

Troubleshooting

  • DISM says “The component store is not recommended for cleanup.” That means there’s little to reclaim. You can still run StartComponentCleanup, but you won’t gain much. Try again after the next feature update.
  • DISM fails with error 0x800f081f or similar. This usually indicates a corrupted component store. Run sfc /scannow first, then try Dism /Online /Cleanup-Image /RestoreHealth, and then retry the cleanup.
  • The cleanup seems stuck at a certain percentage. Wait at least 30 minutes. If it’s been over an hour with no progress, press Ctrl+C to cancel, then run Dism /Online /Cleanup-Image /StartComponentCleanup again. If it fails repeatedly, restart and try once more.
  • After cleanup, Windows Update fails to install new updates. Run Dism /Online /Cleanup-Image /RestoreHealth to repair the component store, then try updating again. If that doesn’t help, use the Windows Update Troubleshooter from Settings.
  • The folder size in Explorer didn’t change. That’s because Explorer shows the total size including hard links. Use the “Actual Size” from DISM’s AnalyzeComponentStore output to see the real reduction.

Frequently Asked Questions

Is it safe to delete the WinSxS folder?

No. The folder contains critical system components and hard links to system files. Deleting it will make Windows unbootable. Only use the official DISM cleanup commands.

Why is the WinSxS folder so large in Windows 11?

It stores all system components, including multiple versions of each file so that updates can be rolled back. This is by design, and the folder grows over time as updates are installed.

How much space can I actually reclaim?

Typically 1–5 GB on a healthy system. After a feature update, you might reclaim more, but don’t expect dramatic results. The “Actual Size” from DISM is the true space used.

What does the /ResetBase switch do?

It removes all superseded versions of components, permanently. After running it, you cannot uninstall any currently installed updates. It’s safe but irreversible.

Will cleaning WinSxS affect my ability to install future updates?

No, as long as you use the built-in DISM tool. It’s designed to clean safely while keeping the component store healthy. Future updates will install normally.

Can I move the WinSxS folder to another drive?

No. The folder must remain in C:\Windows for Windows to function. Moving it will break the system. Use other methods to free disk space if needed.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →