How to reduce WinSXS folder size on Windows 7, 8, 10 and 11

Windows 10 and 11 desktop backgrounds.

The WinSXS folder in C:WindowsWinSXS is huge and keeps growing the longer you install Windows. This folder creates unnecessary files over time, including old versions of system components.

This folder also contains files for uninstalled and broken Windows components. Even if you don’t have a Windows component installed, it will be located in your WinSXS folder, and take up space.

Why does WinSXS folder become so large

The WinSXS folder contains all components of the Windows system. In fact, component files found elsewhere in Windows are just links to files found in the WinSXS folder. The WinSXS folder contains every operating system file.

When Windows installs updates, it drops the new Windows component into 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 come in handy in the case of a buggy update – but it’s a rarely used feature.

Related: 7 ways to free up hard disk space on Windows

Modern versions of Windows — such as Windows 8, Windows 10, and Windows 11 — include features that attempt to automatically reduce the size of 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 installing a new Windows service pack. The idea was that the system could be cleaned regularly with service packs.

However, Windows 7 only saw one service pack – Service Pack 1 – released in 2010. Microsoft does not intend to release another one. This means that for years, Windows update uninstall files have been piling up on Windows 7 systems and cannot be removed easily.

To fix this problem, Microsoft moved a feature from Windows 8 to Windows 7. The company did it without much fanfare — it was rolled out in a typical minor OS update, the kind that generally doesn’t add new features.

Clean update files

To clean these update files, open the Disk Cleanup wizard (click the Windows key, type “disk cleanup” in the Start menu, and press Enter). Click the Clean System Files button, enable the Clean Windows Update option and click OK. If you’ve been using your Windows for a few years, you’ll likely be able to free up several gigabytes of space.

NB: There are slight user interface differences between Disk Cleanup in 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 restart after doing this, Windows will take a few minutes to clean up system files before you can sign in and use the desktop.

If you don’t see this feature in the Disk Cleanup window, you’re probably using Windows 7 and later for 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 is a StartComponentCleanup scheduled task built into Windows that will automatically run in the background, cleaning components 30 days after you install them. This 30-day period gives you time to uninstall an update if it causes problems.

If you want to clean updates manually, you can also use the Windows Update Cleanup option in the disk usage window, just like you can in Windows 7. (To open it, click the Windows key, type “disk cleanup” perform a search, and click the “Free up disk space” shortcut by removing unnecessary files” that appears.)

Windows 8.1, 10, and 11 give you more options, allowing you to forcibly remove all previous versions of components that were uninstalled, even those that weren’t there more than 30 days ago. These commands must be run in an elevated Command Prompt – in other words, you must start the Command Prompt window as an administrator.

For example, the following command will uninstall all previous versions of components without the 30-day grace period for the scheduled task:

DISM.exe /Online /Cleanup-Image /StartComponentCleanup

The following command will remove the files required to uninstall service packs. You will not 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 each component. You will not be able to uninstall any currently installed service packs or updates after this is complete:

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, which you can access from the Control Panel.

Even features you don’t install—that is, the features you see not selected in this window—are stored on your hard drive in the WinSXS folder. If you choose to install it, it will be available from your WinSXS folder. This means that you don’t have to download anything or provide Windows installation media to install these features.

However, these features take up space. While this should not be important on typical computers, users with very low storage amounts or Windows server administrators who want to reduce their Windows installations to the smallest possible set of system files may want to remove these files from their drives their firmware.

For this reason, Windows 8 has added a new option that allows you to completely remove these uninstalled components from the WinSXS folder, freeing up space. This feature is still present in Windows 10 and Windows 11 as well. If you choose to install the removed components later, Windows will prompt you to download component files from Microsoft.

To do this, open a Command Prompt window as administrator. Use the following command to see what features are available to you:

DISM.exe / online / english / get features / format: table

You will see a table with the names and states of the features.

To remove a feature from your system, you can use the following command, replacing NAME with the name of the feature you want to remove. You can get the name of the feature you need from the table above.

DISM.exe /Online /Feature Disable /Dn:Name /Remove

Related: 6 ways to free up hard disk space used by Windows system files

If you run the /Get-Features command again, you will now see that the feature has a status of “Disabled with Payload Removed” instead of just “Disabled”. This is how you know it is not taking up space on your computer’s hard drive.


If you’re trying to shrink Windows 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.



(Visited 22 times, 1 visits today)

Related posts