Cleaning the WinSxS folder (also called the Windows component store) safely reclaims disk space without breaking Windows updates or system stability. This guide shows you the built-in tools that do the job correctly—no manual deletion, which can corrupt your system. You will need an administrator account and a stable internet connection for some steps.
What You’ll Need
- An administrator account on Windows 10 or Windows 11
- At least 10–20 GB of free disk space to run the cleanup tools (they need room to work)
- A stable internet connection (for the optional update cleanup step)
- About 15–30 minutes of time, depending on how large the folder is
Step-by-Step
- Check the current size of the WinSxS folder. Open Command Prompt as administrator (right-click the Start button and select “Command Prompt (Admin)” or “Terminal (Admin)”). Type the following and press Enter:
Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore. This shows you whether the component store is actually large and how much space you can expect to reclaim. It does not delete anything. - Run Disk Cleanup (cleanmgr). Open the Start menu, type “Disk Cleanup,” and select the result. Choose your system drive (usually C:) and click OK. Wait for it to scan.
- Click “Clean up system files.” This requires administrator privileges. Select the system drive again and click OK. The scan will take longer this time.
- Check the “Windows Update Cleanup” option. In the list, look for “Windows Update Cleanup” (it may be labeled “Windows Update Cleanup” or “Service Pack Backup Files” on older versions). Also check “Previous Windows installations” if you want to remove old Windows.old folders. Do not select “Downloads” unless you are sure you do not need any downloaded installers.
- Click OK and then “Delete Files.” Disk Cleanup will remove the selected items. This can take several minutes. Your computer may not need to restart, but it is a good idea to do so later.
- Run the Deployment Image Servicing and Management (DISM) tool. Open Command Prompt as administrator again. Type the following and press Enter:
Dism.exe /Online /Cleanup-Image /StartComponentCleanup. This removes superseded versions of components and is the most effective built-in method. It can take 10–20 minutes. Do not close the window. - Optional: Reset the base of the component store. If you want to remove even more, run:
Dism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase. This permanently removes all previous versions of components, so you cannot uninstall current updates after this. Only do this if you are sure you will not need to roll back an update. - Verify the new size. Run the AnalyzeComponentStore command from step 1 again to see how much space you reclaimed. The size shown will still be large (several GB) because the component store is a hard-linked folder—the actual files are shared with the system, so the on-disk size is not the same as the “Installed Size” shown in File Explorer.
Common Mistakes
- Manually deleting files inside WinSxS. This is the biggest mistake. The folder contains hard links to system files; deleting them can break Windows, prevent updates, and even make your PC unbootable. Always use the built-in tools.
- Running /ResetBase unnecessarily. This permanently removes the ability to uninstall current updates. If you are not running out of space, skip this step.
- Using third-party “WinSxS cleaner” tools. Most are not reliable and may delete critical components. Stick with DISM and Disk Cleanup.
- Expecting huge space savings. WinSxS typically grows to 5–15 GB. After cleanup, you might reclaim 1–5 GB, not 20 GB. The folder will still appear large due to hard links.
- Running the tools without administrator rights. The commands will fail with “Access denied” or “Error 87” if you are not an admin.
Tips
- Run Disk Cleanup regularly (every few months) to keep the component store from growing too large.
- Use the Storage Sense feature in Windows Settings (System > Storage > Temporary files) as an alternative; it uses the same underlying cleanup mechanism.
- If you are low on disk space, also consider moving your page file, disabling hibernation (if you do not use it), and uninstalling large applications. These can free more space than WinSxS cleanup.
- Always create a system restore point before running DISM commands, just in case.
- Run the cleanup after a big feature update—that is when the component store is largest.
Troubleshooting
- DISM reports “Error 87” or “The parameter is incorrect.” Make sure you are typing the command exactly as shown, with the correct slashes and spaces. Also ensure you are running Command Prompt as administrator.
- DISM hangs or takes forever. This is normal—it can take 20–30 minutes on slow drives. Do not interrupt it. If it seems stuck for over an hour, close and reopen the command prompt and try again; sometimes the Windows Modules Installer service needs a restart.
- Disk Cleanup does not show “Windows Update Cleanup.” This option only appears if there are old update files to remove. If you have recently run cleanup, it may not show. Also, make sure you clicked “Clean up system files” first.
- After cleanup, Windows Update fails. This is rare but can happen if the component store is corrupted. Run
Dism.exe /Online /Cleanup-Image /RestoreHealthto repair it, then try updates again. - You cannot uninstall a recent update after /ResetBase. That is expected—the reset base removes the old component versions. You will need to use System Restore or a backup if you need to roll back.
Frequently Asked Questions
Is it safe to delete the WinSxS folder?
No. Never delete the folder manually. It is a critical system component. Use the built-in DISM and Disk Cleanup tools, which safely remove outdated versions.
Why is the WinSxS folder so large even after cleanup?
WinSxS uses hard links, meaning the same file appears in multiple locations but takes up space only once. The “Installed Size” in File Explorer is misleading; the actual on-disk size is much smaller. The AnalyzeComponentStore command shows the true size.
Will cleaning WinSxS affect my ability to install future updates?
No, the standard cleanup (without /ResetBase) keeps the latest component versions intact, so future updates will install normally. /ResetBase only removes old versions, which does not affect new updates.
How often should I clean WinSxS?
Only when you need disk space. Running it too often (e.g., monthly) provides little benefit and can slow down your system temporarily. After a feature update is a good time.
Can I use third-party software to clean WinSxS?
It is not recommended. Most third-party cleaners do not understand hard links and may delete files that are still in use, causing system instability. Stick with Microsoft’s built-in tools.
Does cleaning WinSxS delete my personal files?
No. The cleanup only removes obsolete Windows components and update backups. Your documents, photos, and other personal data are untouched.
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
- Fix OEM Activation Error 0xc004c060 in Windows 10
- Why Does My App Run One Query for the List and One per Item?
- Fix Google Chrome Has Stopped Working
- Fix Apps Not Downloading From Play Store
- Secure a Samsung Galaxy After a Zero-Day Disclosure
- What to Check Before Installing Linux Alongside Windows