Windows Server 2008 disk cleanup

by John, Updated on: November 30, 2020

This article introduces how to install and enable Disk Cleanup for Windows Server 2008 (R2), how to free up disk space with Server 2008 Disk Cleanup utility.

When system C: drive is running out of space, you may run disk cleanup utility to delete the unnecessary and junk files, then you can reclaim disk space. Windows Server 2008 has native disk cleanup utility to accomplish this task. Disk Cleanup (cleanmgr.exe) is a computer maintenance utility included from Microsoft Windows 98 designed to free up disk space on hard drives. Disk Cleanup utility can remove files that are no longer needed or that can be safely deleted. Removing unnecessary files, including temporary files, can help to speed up and improve computer performance.

However, unlike other versions, Disk Cleanup is not enabled in Windows Server 2008 by default, so before cleaning up disk for Server 2008 (and R2), you need to install or enable it.

1. How to install/enable Disk Cleanup in Windows Server 2008

There are two ways to enable Disk Cleanup in Windows Server 2008 and R2:

  1. Copy files from WinSxS
  2. Install Desktop Experience
The first option is easy and fast, but Disk Cleanup doesn't work in some environment. The second option make sure Disk Cleanup working in all conditions, but it requires reboot to complete installing the Desktop Experience component. Furthermore, together with Desktop Experience, many other unnecessary components are installed on the server, such as Windows Media Player, Desktop themes, Audio Recording.

Option 1: Enable Disk Cleanup in Server 2008 without reboot

The files to copy from WinSxS are different on Windows Server 2008 and R2, so firstly check the Server version, press Windows and R on your keyboard to start Run, type winver and press Enter.


Copy WinSxS files in Windows Server 2008 x64:

1. Click Start menu, right click Command Prompt on the top and select Run as administrator.

2. Paste the command below and press Enter:

copy C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.0.6001.18000_none_c962d1e515e94269\cleanmgr.exe C:\Windows\System32\

3. Paste the command:

copy C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.0.6001.18000_en-us_b9f50b71510436f2\cleanmgr.exe.mui C:\Windows\System32\en-US\

Copy WinSxS files in Windows Server 2008 x64 R2:

1. Run Command Prompt as administrator.

2. Paste the command:

copy C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.1.7600.16385_none_c9392808773cd7da\cleanmgr.exe C:\Windows\System32\

3. Paste the command:

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

Option 2: Install Disk Cleanup in Windows Server 2008 (r2)

Step 1: Click Server Manager on bottom left next to Start menu.

Server manager

Step 2: Click Features on top left and then Add Features on the right.

Add Features

Step 3: Click the check-box in front of Desktop Experience. Add Features Wizard will ask you to install Ink and Handwritting Services if you have not previously installed, click Add Required Features.

Add required features

Step 4: Click the check-box of Desktop Experience again, and then click Next.

Desktop Experience

Step 5: Click Install to confirm and start installing.


Once the features have been installed, the Wizard will need a reboot in order for the changes to take effect.

Disk Cleanup installed

2. How to free up space with Server 2008 Disk Cleanup utility

There are 3 ways to run Disk Cleanup in Windows Server 2008 and r2:

Press Windows and R together on keyboard, type cleanmgr and press Enter, then select C: or other drive in the drop-down list.


Click Start > All Programs > Accessories > System Tools > Disk Cleanup

From Start

Open File Explorer, right click C drive and select Properties > Disk Cleanup.

From explorer

The 2nd and 3rd way is only valid after you installing Server 2008 Disk Cleanup with Desktop Experience.

Server 2008 Disk Cleanup will calculate how much space will be able to free on C drive (or other one you selected), then list the junk files in next window.

All these files can be selected and removed safely, highlight any type of files, you'll see its description on the bottom.

Click OK to start cleaning up. After it finish, repeat to Clean up system files.

Clean up disk

3. Additional step after cleaning up disk in Server 2008

Server 2008 Disk Cleanup utility is easy to use, runs fast and able to clear up most common types of unnecessary/junk files safely. To the servers that never free up disk, it may help you regain several gigabyte of space.

However, free space will be eaten up quickly by new generated junk files, so you'd better add more space to C drive and expand it as large as possible. Otherwise, C drive will be getting full again in a short time.

If there is free space in other partition on the same disk, follow the steps in the video to shrink this partition and expand C drive:

Video guide

If original disk is small and there is not plenty of free space, you may clone to a larger disk and expand C drive with extra disk space:

Video guide

Besides shrinking, moving, extending and copying disk partition, NIUBI Partition Editor helps merge, convert, defrag, wipe, hide, scan partition and much more.