Windows 8 has a new feature that I've requested
over years! You can now
detect and remove replaced updates so that the WinSxS folder no longer grows so much!
To do this, run this command from comamnd prompt with admin rights:
dism.exe /online /cleanup-image /startcomponentcleanup
it scans all all updates and checks if they are no longer needed and if this is the case it tries to uninstall them. You can see this in the CBS.log:
Quote
2012-10-21 14:40:35, Info CBS Deep-Clean: Got [5] packages from the store that can be uninstalled
2012-10-21 14:40:35, Info CBS Deep-Clean: Skipping package [Package_for_KB2739987~31bf3856ad364e35~x86~~6.2.1.1] since it is marked permanent
2012-10-21 14:40:35, Info CBS Deep-Clean: Skipping package [Package_for_KB2740443~31bf3856ad364e35~x86~~6.2.1.1] since it is marked permanent
2012-10-21 14:40:35, Info CBS Deep-Clean: Skipping package [Package_for_KB2740446~31bf3856ad364e35~x86~~6.2.1.1] since it is marked permanent
2012-10-21 14:40:35, Info CBS Deep-Clean: Skipping package [Package_for_KB2740448~31bf3856ad364e35~x86~~6.2.1.1] since it is marked permanent
2012-10-21 14:40:35, Info CBS Deep-Clean: Trying to uninstall package [Package_for_KB2755399~31bf3856ad364e35~x86~~6.2.2.0]
2012-10-21 14:40:35, Info CBS Exec: Uninstall package: Package_for_KB2755399~31bf3856ad364e35~x86~~6.2.2.0
2012-10-21 14:40:35, Info CBS Exec: Uninstall package: Package_for_KB2755399_RTM~31bf3856ad364e35~x86~~6.2.2.0
2012-10-21 14:40:35, Info CBS Exec: Uninstall package: Package_1_for_KB2755399~31bf3856ad364e35~x86~~6.2.2.0
2012-10-21 14:40:35, Info CBS Exec: Unstage package: Package_1_for_KB2755399~31bf3856ad364e35~x86~~6.2.2.0, Update: 2755399-1_neutral_LDR
2012-10-21 14:40:35, Info CBS Exec: Unstaging Package: Package_1_for_KB2755399~31bf3856ad364e35~x86~~6.2.2.0, Update: 2755399-1_neutral_LDR, UnstageDeployment/UnpinDeployment: x86_339b82ce9a8adb551b2a0619dec51cdd_31bf3856ad364e35_6.2.9200.20523_none_40d61ce9c0963925
2012-10-21 14:40:35, Info CBS Exec: Uninstall package: Package_1_for_KB2755399~31bf3856ad364e35~x86~~6.2.2.0, Update: 2755399-2_neutral_GDR
2012-10-21 14:40:35, Info CBS Exec: Unprojecting Package: Package_1_for_KB2755399~31bf3856ad364e35~x86~~6.2.2.0, Update: 2755399-2_neutral_GDR, UninstallDeployment: x86_1995aa86a2baf648aca107ca0ebe14b1_31bf3856ad364e35_6.2.9200.16421_none_96e08146a34fd303
2012-10-21 14:40:35, Info CBS Appl: Selfupdate, Component: x86_adobe-flash-for-windows_31bf3856ad364e35_0.0.0.0_none_4f79d9b3b1b9cfff (6.2.9200.16426), elevation:2, lower version revision holder: 6.2.9200.16384
2012-10-21 14:40:35, Info CBS Appl: Selfupdate, Component: x86_adobe-flash-for-windows_31bf3856ad364e35_0.0.0.0_none_4f79d9b3b1b9cfff (6.2.9200.20527), elevation:2, lower version revision holder: 6.2.9200.16426
2012-10-21 14:40:35, Info CBS Exec: Unpinning Package: Package_1_for_KB2755399~31bf3856ad364e35~x86~~6.2.2.0, Update: 2755399-2_neutral_GDR, UnpinDeployment: x86_1995aa86a2baf648aca107ca0ebe14b1_31bf3856ad364e35_6.2.9200.16421_none_96e08146a34fd303
2012-10-21 14:40:35, Info CBS Exec: Reboot required for Package: Package_1_for_KB2755399~31bf3856ad364e35~x86~~6.2.2.0 while working with Update: 2755399-2_neutral_GDR
2012-10-21 14:40:35, Info CBS Plan: Start to process component watchlist
2012-10-21 14:40:35, Info CBS Exec: The Package or one of its Updates required a reboot so transaction commit was skipped, Package's changes need to be pended.
so in my test VM, the Update KB2755399-v2 is removed because I have the update KB2758994 installed which includes a newer Adobe flash version! But, it has a limitation. You can see that some updates, which are marked as permanent, can't be removed and will be skipped.
There is also a way from the GUI, which reduces the WinSxS size even more! Start disk cleanp, and select "Windows Update Cleanup":
01_DiskCleanUp.png (7.41K)
Number of downloads: 42
02_DiskCleanUp.png (21.16K)
Number of downloads: 40
03_DiskCleanUp.png (6.87K)
Number of downloads: 32
What is does, in addition to the DISM command, is to also use the NTFS compression to compress files, that are not removable and files that are not in use like drivers, the backup and Manifest folder!
01_Win8_WinSxS_original_size.png (224.29K)
Number of downloads: 78
02_Win8_WinSxS_after_cleanup_size.png (198.5K)
Number of downloads: 104
As you can see, the WinSxS folder is now 500MB smaller when activating the compression!
This is a fantastic news for SSD users