How-To Geek
How to Reduce the Size of Your WinSXS Folder on Windows 7 or 8

The WinSXS folder at C:\Windows\WinSXS is massive and continues to grow the longer you have Windows installed. This folder builds up unnecessary files over time, such as 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.
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 more than three years, Windows update uninstallation files have been building up on Windows 7 systems and couldn’t be easily removed.
Clean Up Update Files
To fix this problem, Microsoft recently backported a feature from Windows 8 to Windows 7. They 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.
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 7 system for a few years, you’ll likely be able to free several gigabytes of space.
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 behind on your updates — install the latest updates from Windows Update.

Windows 8 and 8.1 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 gives 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, 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 installs 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. 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

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.
I'm on the latest Windows updates, and the option to clean up Windows Update is not available to me.
Defiant, I have W7x64. When I first heard about this I ran it and recovered 6.6 GB. However, I just opened Disk Cleanup and the Windows Update Cleanup option isn't there anymore! I'm really confused.
In spite of this I noticed while Disk Cleanup is "Calculating how much space you can save" it does check Windows Update Cleanup. I'm not sure but I'm guessing that once there's nothing for that option it won't show up?
I also have all Win 7 updates and feature is not available in my Disk Cleanup. Is it possible that only 64-bit versions were updated with this feature (Mine is 32-bit)?
Harry did you select cleanup system files , That is a necessary step
Regarding Windows 7 - this feature becomes available after KB2852386 update installation - which is marked as optional.
You can find more information here - http://support.microsoft.com/kb/2852386/en-us
I just opened Disk Cleanup on my Windows 8.1 system and "Windows Update Cleanup" frees only 29 MB but the "Device driver packages" option will free 5.03 GB.It appears just like the WinSXS folder grows with updates the "System32\DriverStore" folder grows with driver updates.I had saw with WinDirStat that the DriverStore folder was big but wasn't sure why or how to change that.It seems this article indirectly helped me.
Ahah! Thanks for that link radari. Although I had already seen that Microsoft KB I missed the following which was under Introduction-->Notes...
And I agree with ian2 - you do have to select Cleanup system files. That was missing from the article. I hope you are reading this ChrisHoffman.
Thanks...I missed that! Found it and was able to delete Update files.
Hi.
I am trying to remove some features on Win7 x64 but I get an error.
I am running
C:\Windows\System32>DISM.exe /Online /Disable-Feature /featurename:TabletPCOC /RemoveAnd I get in response this
Deployment Image Servicing and Management tool Version: 6.1.7600.16385 Image Version: 6.1.7600.16385 Error: 87 The remove option is not recognized in this context. For more information, refer to the help. The DISM log file can be found at C:\Windows\Logs\DISM\dism.logHere is the dism log http://pastebin.com/XE81ppcc
Those parameters won't work on Win7 DISM, run dism.exe /? to see for yourself
My Windows 7 (64bit) system behaved as if it had installed a 'restart required' update when I powered it on after having done the 'Windows Update' disk cleanup of 2.9 GB. It took long enough that I checked the logs to figure out what had caused that, since there were no new updates since my last shutdown. Might be worthwhile letting people know that their next startup could take quite awhile if they choose to take your advice, Chris.
For windows 7, in order for the disk cleanup to do the action as mentioned, the Disk Cleanup program needs to be RUN AS ADMINISTRATOR. Otherwise, very helpful article.
I have a 64bit win8 system, in the winsxs folder there are many folders like amd-64 can i delete those folders without causing any problems?
The AMD64 folders have 64-bit system files and like other things in WinSXS should not be deleted.
Only those with "small" hard disk for the OS or small partition for OS need worry about this. Freeing 6 to 25 GB on a 500GB or 1 TB disk is for all intents and purposes meaningless.
Thanks for that - made all the difference. Since I'm the only one ever using my computer, I never seem to think of "running as administrator".
When I did that, the System File cleanup disappeared.