Best Way to clean up WinSXS folder on Server 2008 R2
-
almost all our servers (VMs) have a 40GB C Drive for the OS install. A lot of them I'm finding are near full, this seems to be because the WinSxS folder is huge (one right now is 21GB). What's the best way to clean it? I know you can install windows desktop experience and then use the disk cleanup utility but I do no want to go through that trouble.
-
I know that @GregoryHall was working on this just this week. Maybe he has some insight.
-
What about using the powershell script from https://gallery.technet.microsoft.com/scriptcenter/CleanMgrexeKB2852386-83d7a1ae
-
@Ambarishrh said:
What about using the powershell script from https://gallery.technet.microsoft.com/scriptcenter/CleanMgrexeKB2852386-83d7a1ae
Thanks. Sadly that requires the Desktop Experience feature to be installed. Not sure I want to be doing that on all my servers. at least 25 of them are heavy load SQL servers.
-
This seems like explaining what you want
-
@Ambarishrh said:
This seems like explaining what you want
Yep, that'd do it.
I wrote a How-To on this a while ago
Shameless plug
http://community.spiceworks.com/how_to/29928-enable-disk-clean-on-server-2008-and-2008-r2 -
@thecreativeone91 said:
almost all our servers (VMs) have a 40GB C Drive for the OS install. A lot of them I'm finding are near full, this seems to be because the WinSxS folder is huge (one right now is 21GB). What's the best way to clean it? I know you can install windows desktop experience and then use the disk cleanup utility but I do no want to go through that trouble.
Even with cleanmgr.exe, it won't clean up much of the winsxs folder, if any. It seems almost an untameable. I've had to extend the OS drives to accommodate the bloating caused by that folder as I haven't been able to find an effective solution.
-
This is something that I love about Linux, disk space rarely changes and when it does it is almost always completely predictable and understandable. Windows seems to always have this complex sprawl of files over time that no one is sure are or are not safe to remove or where they are.
-
Pretty crazy. We're mostly on server 2012 R2 and might move these to the Server (2016) or whatever it's called. But we try to use as little of diskspace as possible. most of our VMs are using 40GB C Drives. moving to 80GB is going to be painful. We still have about 60 or so still on Win 2k8 R2. Many of our SANs only have 2-8TB free right now so yeah. Thanks Microsoft. I did find this command which may help me dism /online /cleanup-image /spsuperseded We shall see.
-
So yeah I ran the Disk Cleanup tool on some of them. We have approx 14 servers with less than 10GB left on the C Drive (which is only the windows install, nothing else all 40GB).
Anyway the tool sometimes caused them to have less disk space free after it ran. for example an application server went from having 1.8GB free to having 215mb free after running disk cleanup and the superseded cleanup stated here: http://blogs.technet.com/b/joscon/archive/2011/02/15/how-to-reclaim-space-after-applying-service-pack-1.aspx