How to clean up WinSxS folder on SBS 2011 or Windows 2008 R2

Windows SBS 2011

On some early installations of SBS 2011 OEMs weren’t always very generous with the hard disk partition size for C:, and administrators quickly found themsleves juggling for diskpace. Luckily there are wizards to move various componets of SBS (Exchange, WSUS, Sharepoint and Home Folders) to different locations, namely a different partion or data drive, but even by doing that an installation that has now been running for several years may find diskspace running out.

Last month Microsoft released an optional update for Windows 2008 R2 which added the ability to cleanup the WinSxS folder by using the Disk Cleanup Wizard. The WinSxS folder can often be numerous Gigabytes in size because it contains a copy of all the Windows Updates applied to the computer, effectively a complete copy if Windows so that you are able to roll back an update if you need to.

The only caveat to this process is that on the Windows 2008 R2 server you need to install the Desktop Experience Feature to be able to run the Disk Cleanup Wizard.

On my Test SBS server using WindDirStat you can see the WinSxS folder is 11.3GB in size.

WinDirStat - WinSxS folder before clean up
Look at the KB article KB2852386, and then download the update for WIndows 2008 R2 from here.

Install Update, click Yes at the Windows Update Standalone Installer prompt.

Windows Update Standalone Installer

Installing Update

Click Close.

Update Complete

Once installed run Server Manager, select Features click Add Feature.

Server Manager - FeaturesSelect the Desktop Experience Feature.

Add FeatureClick Add Required Features button to add Ink Support.

Add required Featres - Ink Support

Click Next.

Desktop Experience Selected

Confirm selections and click Install.

Confirm Selections

Click Close.

Installation ResultsClick Yes to restart now (assuming you are doing this in a maintenance windows). The sever will reboot once configuring the update, then automatically reboot again before offering you the Ctrl – Alt – Delete prompt, the process took about 5 minutes on my test server.

Restart Now

When you next login the Installation Results will be displayed. Click Close.

Resume Configuration Wizard

Now to run the Disk Cleanup Wizard.

Click Start – All Programs – Accessories – System Tools, and select Disk Cleanup.

Disk Cleanup

The Disk Cleanup will then show you files what it can clean. With everything selected I can save 331MB of space, which isn’t going to make a huge difference, but this doesn’t include the the WinSxS folder.

Initial Disk Cleanup

To include the WinSxS folder in the Disk Cleanup click the Clean up system files button.

Disk Cleanup 2

There are now options to cleanup Service Pack Backup Files and Windows Update Cleanup. So I can now recover 3.61GB, which on a C: with not much diskspace can make a huge difference. Check the boxes to select the items you want to cleanup and click OK.

Cleanup system files

Click the Delete Files button at the Are you sure you want to permanently delete these files? prompt. This can take a few minutes depending on how much you are deleting.

Are you sure?

Once completed another quick scan with WinDirStat shows the WinSxS folder is now 7.8GB in size, reduce from 11.3GB before we started.

WinDirStat - WinSxS folder after clean up

Related Articles:

Related Posts:

1. PowerShell: Get-ADComputer to retrieve computer last logon date – part 1

2. Exchange 2010 SP3 Update Rollup 17 released and installation tips

3. How to delete the Dataservicecomponents.log file in SBS 2008

4. Patching SharePoint on SBS 2011: don’t forget to run PSCONFIG

7 thoughts on “How to clean up WinSxS folder on SBS 2011 or Windows 2008 R2

    1. DZ

      Didn’t work for me either on SBS 2011, downloaded the correct version and also got “This update is not applicable to your computer”

      1. Martijn

        On my SBS2011 installation the KB2852386 update was apparently already installed. I just had to enable the Desktop Experience feature and the steps after that.

  1. Larry

    While the patch is nice. I hard call going from 11.3gig down to 7.8gig a clean up. This is also a huge problem on Windows 7, especially with VDI’s. Trying to keep he disk space usage low on VDI’s only to give up 8gig to this junk is a big time bummer. This folder use to be 50meg on Windows XP.

  2. Marc

    After installing Desktop experience on SBS 2011, I received “network not present or not started”, could not map networks drives, and could not browser the server \server. Had to restore an image backup. I don’t recommend Desktop experience for SBS 2011.

  3. SnowWhite

    The above solution did not work for me. I downloaded KB2852386 and made sure it is the correct version for the Windows 2008 R2 Server.although my server is a Windows 2011 SBS server. It won’t install saying it is not for my server. I examined my server features and “Desktop Experience”, “Handwriting Services” and “Ink Services” are already installed, but I cannot find the “Service Pack Backups” or “Windows Update Cleanup” selections. Nothing relevant to me is there. I am desperate.

    How good is “DISM.exe”?

Comments are closed.