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.
LVL 1
VasAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

systechadminConsultantCommented:
No it wont delete any system files. it is just like disk cleanup utility as provided in windows 2003
rindiCommented:
You can't and shouldn't try cleaning up the winsxs folder on Windows 2008 Servers.
JohnBusiness Consultant (Owner)Commented:
You should install the desktop experience.

Disk Cleanup will clean up Winsxs properly on Windows 8 and above and Server 2012 and above.  Use the "Cleanup System Files" button.

Disk cleanup does not do a good job cleaning up winsxs on Windows 7 and does not clean up winsxs at all on Server 2008.

You should not try to manage winsxs manually. If you need more space, run Tree Size Pro (Jam Software) to see what you might delete. Consider adding more disk space.
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

rindiCommented:
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.
Mark GalvinManaging Director / Principal ConsultantCommented:
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.
VasAuthor Commented:
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?
rindiCommented:
It gives you the option to cleanup windows updates, which mainly use up a lot of the space within the winsxs folder.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JohnBusiness Consultant (Owner)Commented:
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.
Scott CSenior EngineerCommented:
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.
JohnBusiness Consultant (Owner)Commented:
@nathaliev - Thanks and good luck cleaning up and increasing your space.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2012

From novice to tech pro — start learning today.