Cleanup the WinSxS Folder in Windows 8 & 7

In Windows 7 and Windows 8, there is a new folder under C:\Windows called WinSxS, which basically stores dll and component files. It also stores older versions of all dll and component files and can grow to be quite large. In addition to that, a lot of space is taken up by the backup folder, which gets really big after you install a Service Pack, like SP 1 for Windows 7.

Here’s the size of my WinSxS folder on Windows 7:

winsxs windows 7

And here’s the size of the WinSxS folder on Windows 8:

winsxs windows 8

That’s a lot of space, especially for fresh installs of both operating systems! Once you install more Windows updates or any service pack, it’ll shoot up a few more GBs. Unfortunately, this is a super core set of files for Windows, so you never want to try to delete anything yourself. You can, however, save a little space.

The first thing you can do is reduce the size of the backup folder by running the following command (Start, type CMD):

dism /online /cleanup-image /spsuperseded /hidesp

winsxs cleanup tool

If any service pack backup files were found, it will automatically clean them up. In my case, I didn’t install SP1, so there was nothing to remove and hence I didn’t save any space. You can do that on Windows 7 with SP1 and on Windows Vista SP1, you can do the same thing using a different tool. Basically, it removes all the older files, but makes the service pack unremovable.

The file is called VSP1CLN.EXE for Windows Vista SP1 and it’s called COMPCLN.EXE for Windows Vista SP2. You can run these by clicking on Start and then typing in Run. When the Run dialog appears, just type in the commands.

There is also another way to remove the backup files for SP1 in Windows 7 and make it permanent. Simply open up the Disk Cleanup utility, click on Clean Up System Files and then check the Service Pack Backup Files box.

sp 1 files

So again to reiterate, in Vista you have to use VSP1CLN and COMPCLN and for Windows 7 you use the DISM command. Using any of these will make the service pack permanent. Other people have mentioned compressing the backup folder inside the WinSxS folder, but that’s probably not a good idea.  Doing anything else will reduce the reliability of your system.

In Windows 8, there are some nice new features added to the DISM command. You can now remove packages that you no longer want need or want. This is the command:

DISM.exe /Online /Disable-Feature /Featurename:<name> /Remove

So how do you know what features you can disable? Well, you can run the following command to see all the available features:

DISM.exe /Online /English /Get-Features /Format:Table

Now that you have the list, you can disable a feature like SimpleTCP shown below:

DISM.exe /Online /Disable-Feature /Featurename:SimpleTCP /Remove

Pretty neat eh!? So that can save you a lot of space in Windows 8 if you plan on not using a lot of advanced features that are built-in by default. Enjoy!

Comments [2]

  1. richi says:

    I reclaimed 2.5 GB using dism command. Thanks.

  2. Anon says:

    I get an error 87 when trying to do DISM.exe /Online /Disable-Feature /Featurename:SimpleTCP /Remove
    I get the same error when trying to remove anything on the list generated from: DISM.exe /Online /English /Get-Features /Format:Table

Leave a Reply