Windows Server 2019 Disk Cleanup

by John, Published on: March 8, 2020

This article introduces how to clean up disk on Windows Server 2019, 2 ways to free up disk with Server 2019 Disk Cleanup utility and cleanmgr command.

As the latest version, Windows Server 2019 has the same issue with all previous versions: system C drive runs out of space in a certain time. In this situation, firstly you'd better free up disk, then the junk and unnecessary files will be removed, so you can reclaim some disk space. In most cases, you'd better continue to expand system drive with free space in other data volume(s), otherwise, you'll fact to the low disk space issue again in a short time.

In this article I'll show you how to free up disk on Windows Server 2019 with built-in Disk Cleanup utility (with GUI) and cleanmgr command tool.

How to run Windows Server 2019 Disk Cleanup utility

Step 1: Press Windows and E on the keyboard to open File Explorer, right click C drive and click Properties.

Properties

Step 2: Click Disk Cleanup in the pop-up window.

Disk Cleanup

Step 3: Click the check-boxes in front of the files that you want to delete, then click OK and confirm.

Select files

Step 4: Switch to More Options tab to clean up system restore point and shadow copies.

More options

Windows Server 2019 Disk Cleanup utility can remove most of junk and unnecessary files fast and safely. Of course you may run third party system optimization software, but this native cleanup tool is well enough to accomplish this task.

If you don't like this method with wizard, you may try the command method.

Clean up disk on Windows Server 2019 with cleanmgr command

There are several ways to clean up disk with cleanmgr command, select the one that fit for your needs.

Way 1: command and dialog box

  1. Press Windows and R together on the keyboard.
  2. Type cleanmgr and press Enter.
  3. Select C: drive (or other one) in the drop-down box and click OK.
  4. Disk Cleanup dialog box will pop up, the next steps are the same with above (from step 2).

Way 2: command and dialog box with all files selected

  1. Press Windows and R together on the keyboard.
  2. Type cleanmgr /LOWDISK and press Enter.
  3. Disk Cleanup dialog box will pop up with all types of files selected by default, so you just need to click OK to confirm.

Way 3: automatically clean up all junk files

  1. Press Windows and R together on the keyboard.
  2. Type cleanmgr /VERYLOWDISK and press Enter.

Then Disk Cleanup will delete all junk files automatically and then show you a dialog box with result.

Clean up result

Way 4: automatically clean up specified junk files

  1. Press Windows and R together on the keyboard to open Run.
  2. Type cleanmgr /sageset:1 and press Enter. (You can specify the value from 0 to 65535).
  3. Disk Cleanup dialog box will pop up, select the files to delete and click OK.
  4. Press Windows and R together on the keyboard, type cleanmgr /sageset:1 and press Enter. Then the preselected junk files will be deleted without a result window.

In the future, you just need to run cleanmgr /sageset:1. If you want to delete other types of files, Type cleanmgr /sageset:2 in step 2 and run cleanmgr /sageset:2 in step 4.

Additional step after clearing up disk

No matter you clean up disk on Windows Server 2019 with GUI wizard or via command, there's no difference to result. In general, you'll reclaim some disk space but you can't get over 10GB free space. So, you'd better add more free space to C drive.

Download NIUBI Partition Editor and follow the steps in the video:

Video Server 2019

Free space will be transferred to C drive without losing data, Operating System, programs and associated settings, as well as anything else keep the same with before. Besides shrinking and extending disk partitions, NIUBI Partition Editor helps do many other disk partition operations such as merge, move, convert, defrag, hide, wipe, set read-only attribute, scan bad sectors.

You'd better run Server 2019 Disk cleanup once a month to remove new generated junk files. In addition, change output path of programs to other partition.