The WinSXS folder at C:WindowsWinSXS is massive and continues to grow the longer you have Windows installed. This folder builds up unnecessary files over time, including old versions of system components.
This folder also contains files for uninstalled, disabled Windows components. Even if you don’t have a Windows component installed, it will be present in your WinSXS folder, taking up space.
Why the WinSXS Folder Gets too Big
The WinSXS folder contains all Windows system components. In fact, component files elsewhere in Windows are just links to files contained in the WinSXS folder. The WinSXS folder contains every operating system file.
When Windows installs updates, it drops the new Windows component in the WinSXS folder and keeps the old component in the WinSXS folder. This means that every Windows Update you install increases the size of your WinSXS folder. This allows you to uninstall operating system updates from the Control Panel, which can be useful in the case of a buggy update — but it’s a feature that’s rarely used.
Recent versions of Windows — like Windows 8, Windows 10, and Windows 11 — all include features that attempt to automatically reduce the size of the WinSXS.
In its initial release, Windows 7 dealt with this by including a feature that allows Windows to clean up old Windows update files after you install a new Windows service pack. The idea was that the system could be cleaned up regularly along with service packs.
However, Windows 7 only saw one service pack — Service Pack 1 — released in 2010. Microsoft has no intention of launching another. This means that, for years, Windows update uninstallation files were building up on Windows 7 systems and couldn’t be easily removed.
To fix this problem, Microsoft backported a feature from Windows 8 to Windows 7. The company did this without much fanfare — it was rolled out in a typical minor operating system update, the kind that don’t generally add new features.
Clean Up Update Files
To clean up such update files, open the Disk Cleanup wizard (tap the Windows key, type “disk cleanup” into the Start menu, and press Enter). Click the “Clean up System Files” button, enable the “Windows Update Cleanup” option and click “OK.” If you’ve been using your Windows system for a few years, you’ll likely be able to free several gigabytes of space.
Note: There are minor user interface differences between Disk Cleanup on different versions of Windows, but for the most part, the changes are cosmetic. This works on Windows 10, Windows 11, Windows 8, and Windows 7.
The next time you reboot after doing this, Windows will take a few minutes to clean up system files before you can log in and use your desktop.
If you don’t see this feature in the Disk Cleanup window, you’re likely using Windows 7 and behind on your updates — install the latest updates from Windows Update.
RELATED: How Windows Uses The Task Scheduler for System Tasks
Windows 8, 10, and 11 include built-in features that do this automatically. In fact, there’s a StartComponentCleanup scheduled task included with Windows that will automatically run in the background, cleaning up components 30 days after you’ve installed them. This 30-day period gives you time to uninstall an update if it causes problems.
If you’d like to manually clean up updates, you can also use the Windows Update Cleanup option in the Disk Usage window, just as you can on Windows 7. (To open it, tap the Windows key, type “disk cleanup” to perform a search, and click the “Free up disk space by removing unnecessary files” shortcut that appears.)
Windows 8.1, 10, and 11 give you more options, allowing you to forcibly remove all previous versions of uninstalled components, even ones that haven’t been around for more than 30 days. These commands must be run in an elevated Command Prompt — in other words, you must start the Command Prompt window as Administrator.
For example, the following command will uninstall all previous versions of components without the scheduled task’s 30-day grace period:
DISM.exe /online /Cleanup-Image /StartComponentCleanup
The following command will remove files needed for uninstallation of service packs. You won’t be able to uninstall any currently installed service packs after running this command:
DISM.exe /online /Cleanup-Image /SPSuperseded
The following command will remove all old versions of every component. You won’t be able to uninstall any currently installed service packs or updates after this completes:
DISM.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
Remove Features on Demand
Modern versions of Windows allow you to enable or disable Windows features on demand. You’ll find a list of these features in the Windows Features window you can access from the Control Panel.
Even features you don’t have installed — that is, the features you see unchecked in this window — are stored on your hard drive in your WinSXS folder. If you choose to install them, they’ll be made available from your WinSXS folder. This means you won’t have to download anything or provide Windows installation media to install these features.
However, these features take up space. While this shouldn’t matter on typical computers, users with extremely low amounts of storage or Windows server administrators who want to slim their Windows installations down to the smallest possible set of system files may want to get these files off their hard drives.
For this reason, Windows 8 added a new option that allows you to remove these uninstalled components from the WinSXS folder entirely, freeing up space. This feature is still present on Windows 10 and Windows 11, too. If you choose to install the removed components later, Windows will prompt you to download the component files from Microsoft.
To do this, open a Command Prompt window as Administrator. Use the following command to see the features available to you:
DISM.exe /Online /English /Get-Features /Format:Table
You’ll see a table of feature names and their states.
To remove a feature from your system, you’d use the following command, replacing NAME with the name of the feature you want to remove. You can get the feature name you need from the table above.
DISM.exe /Online /Disable-Feature /featurename:NAME /Remove
RELATED: 6 Ways to Free Up Hard Drive Space Used by Windows System Files
If you run the /Get-Features command again, you’ll now see that the feature has a status of “Disabled with Payload Removed” instead of just “Disabled.” That’s how you know it’s not taking up space on your computer’s hard drive.
If you’re trying to slim down a Windows system as much as possible, be sure to check out our lists of ways to free up disk space on Windows and reduce the space used by system files.
- › WIMBoot Explained: How Windows Can Now Fit on a Tiny 16 GB Drive
- › Is It Safe to Delete Everything in Windows’ Disk Cleanup?
- › Yes, That Extra Storage is Overpriced, But You Should Pay For it Anyway
- › YouTube Music vs. Spotify: Which Is Better for Streaming?
- › Grab an Anker 65W USB-C Charger for Just $35 Today
- › Audible Now Has Audio Books With Dolby Atmos
- › Windows 11 Will Make USB4 Easier to Troubleshoot
- › The New Kubuntu XE Could Be the Linux Laptop for You