Finding a WinSxs Solution For Windows Server 2008

On Windows Server 2008 R2 there is no real way to manage the growth of the folder C:\windows\winsxs. This is an issue if you have virtual machines with small system partitions. Hell, it’s an issue because install files from 3 years ago are in a security protected folder that you can’t get rid of without major surgery.

There are lots of articles online from MCEs and MVPs etc saying you do DISM /this /that or COMPCLN.exe. These are all missing the point. They cleanup the stuff prior to the last Service Pack. What about the ~7 gigabytes, and growing, of OS partition space taken by this flaming folder that has no use to it all?

This technet discussion is typical.

However, I did find an article on the microsoft blog about introducing some cleanup to winsxs on Windows 7 that is non-typical, and provides a little clarity. The author, Charity Shelbourne, engages with the commenters specifically about Windows 2008. Hurrah! A comment from GerVoeten on 30th Sept, 2013 is most accurate:

The answer is the only way to clean the winsxs folder up is to uninstall updates and software. There is no guarantee that this will return back to its original size as the files maybe hard linked somewhere.
For 99.9% of us uninstalling updates and software is not really an option, these articles on cleaning up odd files in the os and using disk cleanup is a joke.

In summary, after digging around for 2 days on and off, I think there should be a canonical answer: ┬áif you have Server 2008 R2 and you want to safely cleanup some old install files, wash your hands, pull on your rubber gloves, <small voice of reason>make some backups</small voice of reason>, you’re going in.

Please note this is specific to Windows Server 2008 R2 and doesn’t include Windows 7, Windows 2012.

Advertisements