We manage a pile of Windows Server 2008 R2 machines across a bunch of clients and many of those servers weren’t necessarily built by us. As such, sometimes space is allocated… poorly… And many of those servers are frequently dancing on the edge of running out of space on the C: drive. (I will spare you the rant about 20 GB C: partitions. Maybe.)
While there’s always the option of resizing partitions, there isn’t always the time to do it. Either arranging a convenient time to take the server down during business hours or the more common after-hours (nights and weekends) time to travel onsite and do it at a time that doesn’t inconvenience anyone. Either way, never convenient for everyone.
What usually happens is I run WinDirStat on the server and look for anything obvious that can be cleared. Recycle bin? Logs? Assorted temp directories? That sort of stuff.
What often shows up? C:\windows\WinSxS directory. You know you can’t just delete it, right? Bad form.
Good news. I recently stumbled over a blog post that I have found incredibly helpful for cleaning up WinSxS. Turns out that if your server is reasonably current in patches (you need KB2852386), the Disk Cleanup Wizard has the ability to cleanup Windows Update files.
Can’t find the Disk Cleanup Wizard? Well yeah, there’s a wrinkle there: first you need to install the Desktop Experience Feature. And reboot.
Yeah, I know, I know, but it is worth the amount of space you’ll reclaim. Honest.
And good news, this applies to Server 2012 and R2 as well. On a couple older servers I have reclaimed a lot of space doing this. Which is a heck of a lot easier than rooting around a bunch of random directories trying to find things to delete or compress. Right?