Storage is precious, and on a 256GB or 512GB SSD it is tight. Windows itself is partly to blame. The WinSxS folder can quietly balloon past 20GB, holding multiple versions of system components you may never need again. There is a safe way to shrink it without breaking anything, and a built-in command that does the job.
Key facts
- WinSxS is the Windows component store that keeps multiple versions of system files side by side.
- The folder can reach 15 to 20GB on a typical system.
- A built-in DISM command removes older update files while keeping the latest version for rollbacks.
- Windows has a scheduled task that does similar cleanup, but it waits 30 days after an update.
- Deleting the folder manually is not supported and risks breaking Windows.
What WinSxS actually does
WinSxS stands for Windows side-by-side. It is the component store for the whole operating system. Every time Windows installs an update, driver, or feature, it does not overwrite old files. It keeps the previous version alongside the new one, which is why the folder grows.
That setup serves real purposes. It lets you uninstall a problematic update and roll back. It also prevents DLL conflicts when different apps depend on different versions of the same system file.
The trade-off is space. After a year of patches, the folder becomes a heavyweight.
Why Windows cleanup is slow by design
Windows is not blind to this bloat. Under Task Scheduler, in the Servicing folder, a task called StartComponentCleanup runs automatically and trims older components.
The catch is timing. It waits 30 days after an update before it touches anything. If you need space today, that is a long wait. Hence the manual command.
The DISM command that actually works
Before running anything, get the real number. The size shown in File Explorer is inaccurate because some files inside WinSxS are hard-linked to System32 and other locations.
Open PowerShell as administrator and run:
“`
DISM /Online /Cleanup-Image /AnalyzeComponentStore
“`
This gives you the actual size on disk.
Then run the cleanup:
“`
DISM /Online /Cleanup-Image /StartComponentCleanup
“`
This removes all older update files except the most recent one, preserving a rollback target. The folder will not empty, but it shrinks substantially. Re-run the analysis command to see the difference. In testing, this freed roughly 10GB from a 24GB folder, though results vary based on update history.
For those who want maximum space, adding `/ResetBase` removes all update files including the most recent:
“`
DISM /Online /Cleanup-Image /StartComponentCleanup /ResetBase
“`
This eliminates rollback ability entirely. Only use it if you are certain the current build is stable and you do not plan to go back.
Who should care about this cleanup
| Situation | Recommendation |
|---|---|
| 256GB SSD with <50GB free | Run the standard command after major updates |
| 512GB SSD with plenty of free space | Skip it; Windows will handle cleanup eventually |
| Planning a clean reinstall soon | The aggressive reset flag is fair game |
| Rely on rollback for business/stability | Leave the folder alone; use other methods first |
Our analysis
This is one of the few Windows maintenance tools that actually delivers what it promises, without third-party software. The scheduled task is too slow, and manual deletion is too risky. The DISM command sits in the middle: aggressive enough to help, conservative enough not to break rollback.
The trade-off is binary. You cannot cherry-pick which updates to keep. The command keeps the latest and drops everything else. If you need a specific older build for compatibility reasons, this is not your tool.
For most users on small SSDs, the math is straightforward. WinSxS grows on autopilot, and Windows cleans it slowly. Running the standard command once after a heavy update cycle is a reasonable habit, especially when free space drops below 50GB.
What to watch: running this command on a brand-new installation with no updates rarely frees much space. The gains accumulate over months. Also, the exact savings depend on how many updates you have installed and their individual sizes.
Bottom line
WinSxS is not junk, but it is hungry. A single DISM command is the safest way to trim it without dismantling the rollback safety net. Run it when you need space, not out of habit.
Key takeaways
- WinSxS holds old components for rollbacks, so manual deletion is not safe.
- Use DISM /AnalyzeComponentStore in PowerShell for a real size number, not folder properties.
- The standard StartComponentCleanup command keeps the latest update and drops the rest.
- Windows does run cleanup automatically, but on a 30-day delay.
- The /ResetBase option removes everything and should be used only if you do not need rollback.
Frequently asked questions
Can I just delete the WinSxS folder to free space?
No, the folder is required for updates and rollbacks. Deleting it can break Windows. Use the DISM component cleanup command instead.
How do I check the real size of WinSxS?
Open PowerShell as administrator and run `DISM /Online /Cleanup-Image /AnalyzeComponentStore`. Folder properties can show inaccurate numbers because of hard-linked files.
Will running the cleanup command remove all files in WinSxS?
No, the standard command keeps the most recent update files for rollback. Only the `/ResetBase` option removes everything.
Does Windows clean WinSxS automatically?
Yes, a scheduled task called StartComponentCleanup runs in the background, but it waits 30 days after an update before trimming anything.
How much space will I get back?
It depends on the size and age of stored updates. Testing freed roughly 10GB from a 24GB folder, but individual results vary significantly.
