Disk Cleanup for Windows Server 2008
When system C: drive is running out of space, you can run Disk Cleanup utility to regain free disk space. However, this tool is not installed by default. This page shows how to install, enable and run Disk Cleanup on Windows Server 2008 (R2).
What is Disk Cleanup?
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.
How to install/enable Disk Cleanup?
By default, in Windows Server 2008 R2 there is no Disk Cleanup utility that allows to delete unused files and clean up the WinSxS folder and component store from the files of updates that are no longer required. To run it, there are two options:
- Copy files from WinSxS
- Install Desktop Experience
The 1st option is easy and fast, but in some environment Disk Cleanup doesn’t work. The 2nd option make sure Disk Cleanup work in most 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
- AVI support for Windows
- Windows SideShow
- Windows Defender
- Sync Center
- Audio recording
- Character Map
- Snipping Tool
Enable Disk Cleanup without reboot
Firstly, check the version of your Server 2008, press and on your keyboard to start Run, type “winver” and press Enter.
To Windows Server 2008 x64 without R2:
1. Click Start on bottom left of the screen, right click Command Prompt 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\
To 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\
Install Disk Cleanup with Desktop Experience
Click Server Manager on bottom left corner:
Click Features and then Add Features:
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.
Click the check-box of Desktop Experience again, and then click Next.
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.
After the reboot is complete, you can find Server 2008 Disk Cleanup tool in Start > All Programs > Accessories > System Tools.
How to run Disk Cleanup?
Start Disk Cleanup on Windows Server 2008, there are 3 ways:
2. Press and on your keyboard to start Run, type “cleanmgr” and press Enter.
Select C drive in the drop-down list.
Wait for Disk Cleanup to scan files.
Select the types of files to be removed and click OK. Highlight any type of files, you’ll see its description on the bottom.
Repeat from step 1 and click Clean up system files in the same window above.
Advantages and disadvantages
Server 2008 Disk Cleanup utility is easy to use, runs fast and able to clear up many types of unnecessary files safely. To the server 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 expand C drive to as large as possible. Otherwise, C drive will be getting full again in a short time.
Download NIUBI Partition Editor and follow the steps in the video to extend C drive:
BTW, you’d better run Server 2008 Disk Cleanup tool monthly to delete new generated junk files.