Windows Vista introduced Microsoft’s new ‘component based servicing’ architecture in an effort to make updating and altering the features of the OS more straightforward and put an end to ‘DLL Hell’. Windows 7, 8, 2008 and 2012 all use this component based model. One unanticipated result of this was that over the life of the operating system the Windows component store (WinSXS folder) becomes bloated with thousands of updates and obsolete file versions that are no longer in use.
Above is one of the common questions that Sysadmins found themselves asking when they observed WinSXS bloat. The next question was “How can I reduce the size of this folder?” Until recently the answer was basically that you can’t (at least not significantly or easily), but last month Microsoft released update KB2852386, which back-ports Server 2012 component clean-up features. Let’s see how that goes:
So this is the component store on a 3 year old 2008 R2 SP1 server, and the entire C:\Windows actually adds up to over 30GB. The published system requirements for Windows 2008 required ‘10GB minimum, recommended 40GB+’ disk space, so admins who provisioned thinly ended up with serious storage problems. We’d better install this update and clean it up. The update can be downloaded from here. Once you have downloaded and installed the update it is necessary to install the Desktop Experience feature, either from Server Manager or using Powershell ‘Add-WindowsFeature Desktop-Experience’. This requires a reboot.
Now if we go to Explorer > C:\ > Properties we see that we have a ‘Disk Cleanup’ button on the General tab. Hit that button to launch the Disk Cleanup Wizard. It will take a little while to analyse the partition and identify what can be removed, so go have a cup of tea in the meantime. When you come back it should look like so:
Select the checkboxes for each group you wish to remove. The obvious candidates are ‘Service Pack Backup Files’ and ‘Windows Update Cleanup’, totalling almost 6GB here. Once you hit OK again you’ve got time for several cups of tea – this one took approx.. 40 minutes to complete. Afterwards you can check the size of WinSXS and it should be significantly smaller (this one still seems quite large, but what can you do? At least that’s some space reclaimed.)
I’ve been waiting several years for this update.