WINSXS Folder Cleanup in Windows Server 2008 R2

By | February 8, 2017

What is WINSXS Folder

Before going to WinSXS folder cleanup let understand about WINSXS folder. Windows uses a system folder called WinSxS to store files that are needed for your Windows installation, as well as backups or updates to those files. It’s a space hog, however, taking up several gigabytes of space and growing with each Windows Update you perform. Use the steps below to clean up unnecessary files in that WinSxS folder and reclaim valuable hard drive space.

You can’t just delete everything in the WinSxS folder, because some of those files are needed for Windows to run and update reliably.

WINSXS

How to Clean up the WinSxS Directory

The Windows 7 version of this fix introduced an additional option to the Disk Cleanup wizard that would cleanup previous versions of Windows Update files. KB2852386 adds a Disk Cleanup option on Windows Server 2008 R2, similar to the Windows 7 update.

What does this mean for Windows Server 2008 R2? After installing this update and prior to being able to perform the cleanup, the Desktop Experience feature must be installed. Why you ask? Disk Cleanup is not installed by default on Windows Server 2008 R2. It is instead a component installed with the Desktop Experience feature.

The size of the WinSxS directory will vary by server. Some of you will have smaller WinSxS directories, some larger.

Installing the update is just like installing any other update. Just download and double-click on the .msu file:

WinSXS Folder

Installing the update does not require Desktop Experience to be installed beforehand, but if you check your WinSxS directory again, you’ll see there has been no change to the size. This is expected as we need to run Disk Cleanup in order for this to take effect. It also does not require a reboot to install the hotfix.

But…we can’t do anything with what we just installed until we get Disk Cleanup which is installed with the Desktop Experience feature.

Winsxs Cleanup

When installing Desktop Experience, it does require additional features. Select the button to Add Required Features and click Next and then Install:

WINSXS Folder Cleanup

WINSXS Cleanup

A reboot is required to finalize the install.

WINSXS Cleanup

Click Close and Reboot when prompted.

WINSXS Cleanup

After we reboot, a Disk Cleanup option can be found under Start –> All Programs –> Accessories –> System Tools:

WINSXS Cleanup

On launch, Disk Cleanup prompts for the drive you want to clean up:

WINSXS Cleanup

After clicking Ok, a scan is performed:

WINSXS Cleanup

Several options are provided for cleanup, including a new option for Windows Update Cleanup:

WINSXS Cleanup

WINSXS Cleanup

After cleanup is completed we have to reboot the server because actual cleanup will be done post reboot.

Post reboot WINSXS folder has shrunk to the following:

WINSXS Cleanup