If you’ve had Windows Server running for a while, you may be running out of disk space – particularly on a VM. This article explains how to enable the ‘Disk Cleanup’ utility on Windows Server 2008, 2008 R2, 2012, and 2012 R2 – without enabling Desktop Experience – to recover lots of space from C:WindowsWinSxS.

Disk Cleanup is a free tool provided from Microsoft, but not bundled by default in the Windows Server editions of Windows. Typically, you need to enable the ‘Desktop Experience’ feature to get this simple utility – unfortunately adding unnecessary utilities such as Windows Media Player in the process. This isn’t ideal, and may not even work if you’ve already run out of disk space.

There are two files you need to copy into the correct locations to enable this utility:

  • cleanmgr.exe
  • cleanmgr.exe.mui

These files come bundles with Windows in a secret location, so you simply need to copy them into the folder where they belong.

Once you’ve copied them both, just search for and run ‘cleanmgr’. You’ll need to be an administrator to run it.


Use the list below to find the location of cleanmgr.exe, and then copy it to C:WindowsSystem32

Windows Server 2012

Windows Server 2008 R2

Windows Server 2008


Use the list below to find the location of cleanmgr.exe.mui, and then copy it to C:WindowsSystem32en-US

Windows Server 2012

Windows Server 2008 R2

Windows Server 2008

Windows Server 2012 R2

Microsoft has changed the method used to save Windows Updates, meaning they should take up less space on the disk. However, if you still want to install Disk Cleanup, you need to follow this process:

  1. Install ‘Desktop Experience’ feature via Server Manager
  2. Copy C:WindowsSystem32cleanmgr.exe and C:WindowsSystem32en-UScleanmgr.exe.mui to a separate (non-system) folder
  3. Uninstall ‘Desktop Experience’ feature via Server Manager
  4. Copy cleanmgr.exe back to C:WindowsSystem32, and cleamgr.exe.mui to C:WindowsSystem32en-US

Why does C:WindowsWinSxS get so big?

This folder is the Side-by-Side software folder, which stores a lot of components used within Windows. If you run a utility such as TreeSize, you may notice this folder is very big. This is partially because many files here also show up in separate parts of the filesystem – not duplicates, but just references.

Cleanup WinSxS with DISM

You may also like to cleanup the WinSxS folder via DISM – another free tool provided with Windows, which can perform a similar task to the Disk Cleanup utility.

This free tool runs on the command line. You must run the Command Line as an Administrator (right click on the icon before running it and select ‘Run as Administrator’).

This command will show you if Windows thinks it can save some space:
Dism.exe /online /Cleanup-Image /StartComponentCleanup

And this command will tell actually perform the cleanup:
Dism.exe /online /Cleanup-Image /StartComponentCleanup