After installing Windows Vista/7 or (especially) Windows Server 2008 (including SP and R2), you may notice (and will start to notice) that free space on drive C: keeps shrinking. It seems like a normal thing - the system just fills up.
But after a bit of digging, you'll find that the lion's share of the space is being eaten by the folder at:
C:\Windows\winsxs
And if you keep an eye on it, you'll see its size keeps growing continuously. All the time. And no cleanup ever shrinks the space it takes up.
Why?Because Microsoft decided that with every system update (via the automatic update service, for example) old libraries and files aren't deleted, but kept. So when the library lib.dll (just an example) gets updated, you'll of course get a new version. But the old one stays too. Next update to lib.dll? You now have 3 versions of it on your hard drive - 1 new and 2 old. And so on for every component.
Why is it done this way? Microsoft, as they claim, does it for the sake of compatibility - programs that for some reason need the old library and aren't compatible with the new version will keep working fine, because Windows happily hands them the old version - since it's kept around.
However, they overdid it - when the Windows Server 2008 R2 Standard OS alone eats up 30GB of disk (just the system - nothing else installed) - that's already a wild overkill. And do you think it'll just stop there once space runs out and start deleting old libraries? No! It'll throw errors and simply keel over - so much for a "server-grade OS" from Microsoft.
What can be done?I searched the internet for a long time for a solution. There were options for non-R2 versions, there were options for non-SP versions. But for the latest - R2 - not a single option worked. Very disappointing.
I found this solution (thanks to eddnet), which on test machines significantly cut down the appetite of Windows 7 (including 2008).
This solution "cleans up" the packages that were used to install the Service Pack and similar packages. Not a cure-all, but it freed up a significant amount of space on my systems (gigabytes!)
So, run CMD as administrator and enter:
DISM.exe /online /Cleanup-Image /spsuperseded
Run it. It'll churn away for a while and then report that it cleaned everything up.
Check afterward - and indeed, there's more free space on the system drive, the winsxs folder really shed some extra weight.
Comments