Avatar of Vas
Vas
Flag for United States of America asked on

Cleaning Up the WinSxS Folder on Server 2012 (non-R2)

The WinSxS folder is taking up a lot of space on some of our machines and I don't plan to revert to old service packs or uninstall any updates so if possible I would like to reduce the size of WinSxS.

I found this article:
https://technet.microsoft.com/en-us/library/Dn251565.aspx

But this only works in Windows Server 2012 R2.  The machines I have are non-R2 and these commands do not apply.


Is there a method for reducing the size of the WinSxS folder on Server 2012? (non R2), and if so is the method supported by Microsoft officially?

Also curious about Server 2008.


I tried the disk cleanup tool but it doesn't have a button for cleaning "system files". This might be because I didn't install the Desktop Experience feature, I copied over these files to the System32 and System32/en-US folders instead:


C:\Windows\WinSxS\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.2.9200.16384_none_c60dddc5e750072a\cleanmgr.exe
C:\Windows\WinSxS\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.2.9200.16384_en-us_b6a01752226afbb3\cleanmgr.exe.mui

I'm trying not to install the entire desktop user experience feature on a server, just to get access to this cleanup tool, so unless you know that installing the desktop experience feature will enable the tool to also delete system files I'd rather not install it.


Thanks in advance.
Windows Server 2012Windows Server 2008

Avatar of undefined
Last Comment
John

8/22/2022 - Mon
Systech Admin

No it wont delete any system files. it is just like disk cleanup utility as provided in windows 2003
rindi

You can't and shouldn't try cleaning up the winsxs folder on Windows 2008 Servers.
SOLUTION
John

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
rindi

I misread, sorry. Though you were using 2008 Server and not 2012. With 2012 adding the desktop experience will cleanup Windows updates from the Winsxs, but on 2008 (without the r2) it won't.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Mark Galvin

Hi

As per http://blogs.technet.com/b/joscon/archive/2012/01/18/can-you-safely-delete-files-in-the-windir-installer-directory.aspx
Second is the overall idea that you really should not remove items in the Windows directory


I would recommed using Treesize Free to look at what on the C Drive are taking up space.
Vas

ASKER
So if install the Desktop User Experience on Server 2012 (non-R2), it will give me the option to clean up system files?

This does mean that we would be unable to uninstall a particular patch or service pack however correct?
ASKER CERTIFIED SOLUTION
rindi

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
John

Cleaning up system files will remove old updates. So yes, if the update is older than the cleanup, you may not be able to remove it. It depends on how cleanup removes updates.

Generally, I would only uninstall an update if it was very current (today's news, for example). So this is more an academic question.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Scott C

You should never remove anything from WinSxS folder manually.  Things should only be removed when using the supported disk clean up utility.  If you remove anything manually, you risk destabilizing your system.

If you are running short of disk space, the best thing to do is allocate an additional 30 or so gig of space and leave it at that.

Disk space is cheap.  An unstable server is expensive.
John

@nathaliev - Thanks and good luck cleaning up and increasing your space.