Clean Up the System Drive on Windows 2008 R2

As most system administrators are aware, conflicting DLLs were an issue with versions of Windows before the release of Windows Server 2008.  That issue was resolved with Windows 2008 although it created a new issue:  the winsxs folder and the fact that it continues to grow over time.  Thankfully there is a way to reclaim some of the winsxs disk space on Windows 2008 R2.

The first step is to download and install the following update on your Windows 2008 R2 server.  It is a small update and does not require a reboot.

The next hurdle is finding a way to run Disk Cleanup on the server.  Most references will direct you to install the Desktop Experience feature on the server.  This is really not a good option on a production server as it also installs other features that are not needed when all we want to do is clean up the system drive.

Fortunately there is a workaround for this.  Open up Windows Explorer and navigate to this folder:


You will see cleanmgr.exe located there.  Copy that file to C:\Windows\system32\.  Next navigate to this folder:


You will see cleanmgr.exe.mui located there.  Copy that file to C:\Windows\System32\en-US\.

Now from a command prompt or the Start menu, you can run cleanmgr.exe.  It will now scan your C: and prompt you to cleanup files afterwards.  You will note that there is now an option to clean up Windows Update files.  Select those, accept the prompt to delete the files, and it will clean up any unneeded Windows Update files.

When it is finished, it will just close with no prompt.  You will note that you need to reboot the server in order to complete the process.  Allow an extra few minutes for Windows to finish cleaning up those files after the reboot.

Here is the reference for the location of cleanmgr.exe and cleanmgr.exe.mui: