This article introduces how to reclaim disk space with Windows Server 2016 Disk Cleanup tool. Run Server 2016 cleanmgr from command line and standalone utility.
When hard drive partition especially to system C drive is running low on space, you can clean up disk to regain free space. If you can reclaim plenty of disk space, this problem is solved without doing anything else. If you cannot get enough free space in C drive by cleaning up, you can add more free space from other partitions.
To clean up disk on Windows Server 2016, Microsoft provides native Disk Cleanup utility, which can be used to delete most common types of junk and unnecessary files fast and safely. Better than previous Server 2012, Disk Cleanup is installed by default in Windows Server 2016. To run Disk Cleanup in Windows Server 2016, there are two common ways: from File Explorer or via command line.
How to run Server 2016 Disk Cleanup with GUI
- Press Windows and E together to open File Explorer, right click C: drive and select Properties.
- Click Disk Cleanup in the pop-up window.
- Wait Server 2016 Disk Cleanup utility to scan junk and unnecessary files. (The time depends on server performance and the amount of junk files.)
- Click the check-boxes in front of the files that you want to delete and then click OK. (If you don't know what the files are, click it and you'll see corresponding description on the bottom.)
- Click Delete Files in the pop-up window to confirm and start deleting.
How to clean up disk from command line (cleanmgr)
Press Windows and R on the keyboard to open Run dialog, type cleanmgr.exe /? and press Enter.
You'll see all switches available for Server 2016 Disk Cleanup:
The list include:
- /D DRIVELETTER
How to clean up disk with command line in Windows Server 2016:
Press Windows and R on the keyboard to open Run, type cleanmgr.exe /d c and press Enter.
Explanation: Run disk cleanup on drive C, C is drive letter without ":"
Some types of files are selected by default, if you want to delete other types of files, you need to click the check-boxes by yourself and click OK.
Run cleanmgr.exe /lowdisk /d c
The switch /LOWDISK is used when a disk drive is running low in disk space. When launched, Disk Cleanup opens with all check-boxes checked by default.
Run cleanmgr.exe /verylowdisk /d c
It is the same as the /LOWDISK disk switch, but it will clean up all files automatically. It won't show you a confirmation, but will show you a dialog to indicate how much free disk space you have now.
Additional step after cleaning up disk
Windows Server 2016 Disk Cleanup is very useful to the computers that never or have not free up disk space for a long time. But if you did not get over 10GB free space for system C drive, you'd better add more free space from other volumes, otherwise, free space will be eaten up by new generated junk files. This is the reason why many people feedback that C drive is getting full again in a short time.
As the safest partition software, NIUBI Partition Editor can transfer free unused space from other volume to C drive without losing data. Operating System, programs and anything else keep the same with before.
Download NIUBI Partition Editor and follow the steps in the video:
There's no difference if you run physical server with SSD, HDD, RAID arrays or virtual server in VMware/Hyper-V.