Win Server 2008 R2: How to enable the Disk Cleanup Utility

Sometimes it is convenient to cleanup some disk space by deleting unneeded files like service pack files, the temporary folder an so on. On Windows 7 workstation, you have the Disk Cleanup Utility to do this:

image

By default, this tool is not enabled on Windows Server 2008 R2. To enable it, there are two possibilities:

    1. (Not recommended) Install the Desktop Experience feature. I don’t recommend this as installing the Desktop Experience feature will not only install Disk Cleanup, but a lot of other utilities you likely don't need on a server (sound recorder, desktop themes, etc). Also, installing the Desktop Experience feature will require a reboot of your server.
    2. (Recommended) Copy 2 files to specific system folders and you can immediately use the tool:

Copy Cleanmgr.exe to %systemroot%\System32.
Copy Cleanmgr.exe.mui to %systemroot%\System32\en-US.
The 2 files are located in
- C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.1.7600.16385_none_c9392808773cd7da\cleanmgr.exe
- C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.1.7600.16385_en-us_b9cb6194b257cc63\cleanmgr.exe.mui

You can then start the tool by executing Cleanmgr.exe

Update: John highlighted in the comments:

If "Windows Update Cleanup" is missing from the cleanup tool then you will also need the following KB installed if not already done so - https://support.microsoft.com/en-gb/kb/2852386

This will allow you to cleanup the WinSXS folder of any superseeded updates.

25 thoughts on “Win Server 2008 R2: How to enable the Disk Cleanup Utility”

  1. Perfect- thanks for the comment/quick Batch script for easy installation. Preferred over installing all of the Desktop Experience junk, too, especially when we just want to reclaim disk space.

  2. I've tried to copy those 2 files on system32 however it doesn't run on my server 2008 r2 standard

  3. I am trying to delete WinSxS directory/ windows update file but Windows Update Cleanup option is not show in disk Cleanup utility i also run through administrator but option not show desktop experience role is also installed kindly tell me how i remove old window upadates file in WinSxS directory

  4. Cool. I like the second method. I have created a batch file based on your instruction:

    Copy C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.1.7600.16385_none_c9392808773cd7da\cleanmgr.exe %systemroot%\System32

    Copy C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.1.7600.16385_en-us_b9cb6194b257cc63\cleanmgr.exe.mui %systemroot%\System32\en-US

    cleanmgr.exe

  5. Thank you worked like a charm and that extra 3.5GB to help hold it over until the older servers can be migrated to 2012R2 really helps.

    1. On Windows 2003 Server, this utility is already installed by default. Just right-click on the C: drive, choose "Properties" and click on "Disk Cleanup".

Leave a Reply to lexxerd Cancel reply

Your email address will not be published. Required fields are marked *