
If your 256 GB or 512 GB SSD keeps running out of room, there’s a cleanup many people have never tried: the WinSxS folder, where Windows keeps older versions of its own components. In a MakeUseOf test, the folder was taking 22 to 24 GB and the cleanup recovered about 10 GB. Results vary by PC, but the method is the one Microsoft recommends, and it only uses tools already built into Windows.
The WinSxS folder and why it grows
WinSxS (short for “Windows Side by Side”) lives at C:\Windows\WinSxS and is Windows’ component store. It holds the components that make up the operating system and keep it running, stored so you can roll back changes or repair corrupted files. Every update adds new versions, and the old ones stick around for a while so a problematic update can be undone.
So the folder grows; according to MakeUseOf, it can reach 15 to 20 GB. The number File Explorer shows overstates it, though. Per Microsoft, a file may appear in several places in the operating system, but there is usually just one copy, and the rest are hard links (pointers to that copy). Explorer doesn’t account for that and adds everything up, so the folder looks bigger than it is.
Never delete anything there by hand. Microsoft warns that removing files from WinSxS, or the whole folder, can damage the system so badly that the PC won’t boot and can’t be updated, because some essential files exist only in that folder. Cleanup has to go through the commands below.
Back up and set a restore point first
The commands that follow are the ones Microsoft documents, and used as described they’re the safe route. Still, this is system servicing, and anyone with important data should prepare first.
- Back up files you can’t lose (documents, photos, projects) to an external drive or the cloud.
- Create a restore point. Per Microsoft Support: select Start, type “Create a restore point” (or press Win+R and run
systempropertiesprotection.exe), then on the System Protection tab select Create, enter a description and confirm. - System Protection has to be turned on, and Microsoft notes it isn’t enabled by default. If it’s off, select Configure, choose Turn on system protection, set the maximum disk space with the slider and select Apply. Older restore points may be deleted to stay within that limit.
- Plug in your laptop. Running out of battery halfway through a servicing operation is a risk you don’t need to take.
A restore point covers system files, installed apps, the registry and settings. Your personal files aren’t included, which is why the backup in step 1 still matters.
Step by step with DISM
DISM is a Windows command-line tool for servicing the system image. These steps work on Windows 10 and 11.
- Open the Start menu and type cmd (or PowerShell).
- Right-click the result and choose Run as administrator.
- To see how much you can recover, type this command and press Enter:
DISM.exe /Online /Cleanup-Image /AnalyzeComponentStore
- Read the report (the table below explains each line) and find “Component Store Cleanup Recommended.”
- If it says “Yes,” run:
DISM.exe /Online /Cleanup-Image /StartComponentCleanup
- Let it finish without closing the window. On PCs with a long update history, it can take a few minutes.
- Restart your PC if Windows asks you to.
Reading the analysis report
Microsoft describes each field in the report. The most useful ones:
| Field | What it means |
|---|---|
| Windows Explorer Reported Size of Component Store | The folder size as Explorer computes it, ignoring hard links |
| Actual Size of Component Store | The real size, accounting for hard links |
| Shared with Windows | Files that also appear elsewhere so Windows can run. Part of the actual size, but not overhead |
| Backups and Disabled Features | Components kept to respond to failures in newer ones or to enable extra features. This is overhead |
| Cache and Temporary Data | Internal files that speed up servicing. Also overhead |
| Date of Last Cleanup | Date of the most recent completed cleanup |
| Number of Reclaimable Packages | Superseded packages that cleanup can remove |
| Component Store Cleanup Recommended | Whether a cleanup could shrink the overhead |
Your real gain is “Backups and Disabled Features” plus “Cache and Temporary Data.” In Microsoft’s own example, the folder showed up as 4.98 GB, but the overhead was only 507.18 MB and the recommendation was “No.” On a fresh or recently cleaned PC, the command gives back little and isn’t worth the effort.
The cost of cleaning up
Per Microsoft, /StartComponentCleanup produces results similar to the automatic Windows task, with two differences: it deletes previous versions of updated components immediately, with no 30-day wait, and it doesn’t stop after an hour the way the scheduled task does.
The space comes at a price: you lose the easy way to uninstall recent updates. Help Desk Geek notes that after the cleanup you can’t roll back updates until the next one arrives, and that some apps relying on older library versions may misbehave. Run it when your PC is working well, not right after an update you’re still evaluating.
/ResetBase and other switches to skip
There’s a more aggressive version:
DISM.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase
It removes all superseded versions of every component. Microsoft warns that afterward none of the updates already installed can be uninstalled (future ones still can). MakeUseOf doesn’t recommend it for average users. If all you want is space, stick with the command without /ResetBase.
Microsoft’s documentation also lists /Defer, used with /ResetBase in factory environments where the operation runs longer than 30 minutes; it has no place on a home PC. The same goes for /SPSuperseded, which removes service pack backups on Windows 10 and, once run, makes the service pack impossible to uninstall.
Safer alternatives
Storage Sense, under Settings > System > Storage, lets Windows remove things you don’t need on its own, such as temporary files and Recycle Bin contents. On Windows 11, “Cleanup recommendations” sorts temporary files, large or unused files, files already synced to the cloud and unused apps into groups, and you choose what to delete.
Disk Cleanup is the classic option. Open it, pick the drive, choose to clean up system files and tick the Windows Update cleanup option; Microsoft lists this as one way to shrink the component store. Read the list carefully: if you upgraded Windows within the last 10 days, the previous version shows up as a deletable item, and removing it ends your ability to roll back, with no undo.
Then there’s the scheduled task. In Task Scheduler Library > Microsoft > Windows > Servicing, run StartComponentCleanup. It waits at least 30 days after an update before removing old versions and stops after one hour, so it may not clean everything. You can trigger the same task from the command line:
schtasks.exe /Run /TN "\Microsoft\Windows\Servicing\StartComponentCleanup"
When to leave DISM alone
- The analysis said “No” for “Component Store Cleanup Recommended”: the gain will be minimal.
- You just installed an update you’re still testing and want to keep the easy way to uninstall it.
- Your PC is crashing or misbehaving after an update and you may need to roll back.
- The battery is low or the power keeps cutting out.
- You’re trying to fix Windows. Cleanup and repair are different jobs: for repair, Microsoft documents
DISM /Online /Cleanup-Image /CheckHealth,/ScanHealthand/RestoreHealth, which check for and fix component store corruption and don’t free space. - Something else is taking the space. And in any case, don’t disable automatic component cleanup; Microsoft strongly recommends leaving it on.
If the drive is still full
DISM only solves part of the problem. If the drive is still crowded afterward, open Settings > System > Storage to see which categories weigh the most; photos, videos and downloads often take far more than Windows itself. Microsoft also suggests moving personal files to external storage and turning on OneDrive Files On-Demand. If you’re adding storage instead, our explainer on microSD card speed ratings shows what C10, U3, V30 and A2 mean before you buy.
Keeping your system updated matters beyond disk space, too. WhatsApp now blocks login on outdated systems, as we reported here, and Android Auto may be ending support for older Android versions.
Frequently asked questions
Do I need to run DISM every month?
No. Windows already has an automatic task that removes old components, with a minimum wait of 30 days after each update. The manual command is for when you need the space now.
How do I clean up without losing the option to uninstall updates?
Let Windows handle it on its own schedule. The automatic task only removes old versions 30 days after an update, while running /StartComponentCleanup by hand deletes them immediately and blocks rolling back the updates left behind until the next one arrives.
- Microsoft Learn: Clean Up the WinSxS Folder
- MakeUseOf
- Help Desk Geek
- Microsoft Learn: Determine the Actual Size of the WinSxS Folder
- Microsoft Learn: DISM Operating System Package Servicing Command-Line Options
- Microsoft Support: Free up drive space in Windows
- Microsoft Support: Create a system restore point


