On Windows 7 and Windows 8/10, there is a new WinSxS folder in the C: Windows folder, which mainly stores the dll and component files. It also stores old versions of all dlls and component files and can grow quite large. In addition, the backup folder takes up a lot of space and becomes very large after installing a service pack such as SP 1 for Windows 7.
Here is the size of my WinSxS folder on Windows 7:
And here is the size of the WinSxS folder in Windows 8/10:
That’s a lot of room, especially for fresh installations of both operating systems! As soon as you install additional Windows updates or any service pack, it will grow by several GB. Unfortunately, this is a super-essential set of files for Windows, so you never want to try to delete anything yourself. However, you can 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
If any backup files of the service pack were found, it will automatically clean them up. In my case, I did not install SP1, so there was nothing to uninstall and therefore I did not save space. You can do this in Windows 7 with Service Pack 1 (SP1) and in Windows Vista with Service Pack 1 (SP1), you can do the same with another tool. Basically, it removes all old files, but makes it impossible to uninstall the service pack.
This file is named VSP1CLN.EXE for Windows Vista SP1 and COMPCLN.EXE for Windows Vista SP2. You can run them by clicking the Start button and typing Run. When the Run dialog box appears, just enter the commands.
There is also another way to delete the backup files for SP1 in Windows 7 and make them permanent. Just open the Disk Cleanup utility, click on “Clean up system files” and then select the “Service Pack Backup Files” checkbox. Also, be sure to check Windows Update Cleanup and Previous Windows Installations if these options are present. The latter will significantly reduce the size of the entire Windows folder
So, again, on Vista you must use VSP1CLN and COMPCLN, and on Windows 7 you use 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 this is probably not a good idea. Any other action will reduce the reliability of your system.
You can also run two other commands that will clean up old or obsolete components. Typically, after running these commands, you will not be able to uninstall installed updates or service packs, so keep that in mind.
DISM.exe / online / Cleanup-Image / StartComponentCleanup DISM.exe / online / Cleanup Image / StartComponentCleanup / ResetBase
Remove Windows features
In Windows 8/10, nice new features have been added to the DISM command. You can now remove packages that you no longer need. You can use commands like the ones below, or simply use the Add and Remove Windows Components option, which gives you a nice graphical interface. This is the command:
DISM.exe / Online / Disable-Feature / Featurename: / Remove
So how do you know which features can be turned off? 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 a list, you can disable a feature like SimpleTCP shown below:
DISM.exe / Online / Disable-Feature / Featurename: SimpleTCP / Remove
Pretty neat, huh!? This can save you a lot of space on Windows 8/10 if you don’t plan on using the many advanced features built in by default. Enjoy!