How to Clean C Drive in Windows Server 2022 via Disk Cleanup

by John, Published on: January 11, 2023

The same with previous versions, C: drive is running out of space in Windows Server 2022. When it happens, you may clean up C drive to reclaim disk space. Deleting the junk and unnecessary files and then you'll get more free space in C drive. To do this, you may use inbuilt Disk Cleanup in Server 2022 or third party software. Disk Cleanup is well enough to accomplish this task. This article introduces how to run Disk Cleanup in Windows Server 2022 with wizard and via command. If you cannot reclaim plenty of disk space, you'd better add more free space to C drive from other partition. This article also introduces how to do this.

How to run Disk Cleanup in Windows Server 2022

There are two ways to open Disk Cleanup in Windows Server 2022:

  1. Open File Explorer, right click C: drive and click "Properties". In the pop-up window, click Disk Cleanup.
  2. Press Windows + R keys, type cleanmgr and press Enter. C: drive is selected by default, simply click OK.

The same window will be opended.

How to clean up C drive in Server 2022 after Disk Cleanup is opened:

  1. Click the check-box in front of the files that you want to delete and then click OK.
    Disk Cleanup
  2. Click Delete Files in the pop-up window to confirm and start deleting.

How to clean up C drive in Server 2022 with command

If you want to run Disk Cleanup in Windows Server 2022 via command, follow the steps below.

Way 1: Select all files automatically but confirm manually

  1. Press Windows + R together to open Run.
  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 2: Clean up all junk files automatically

  1. Press Windows + 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.

Way 3: Clean up specified junk files automatically

  1. Press Windows + 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.

Extend C drive larger if you can't regain enough space

If you never free up disk space before, you may get over 10GB free space in C drive. Hoever, it's not enough in most cases. Because new junk files are keeping saved to C drive, these free space will be eaten up quickly. If you don't want to see C drive getting full again in the near future, you'd better add more space from other partition.

With same disk partition software, you can shrink other partition on the same disk. Free space in the partition will be released and changed to be Unallocated. Adding this Unallocated space to C drive and then you'll get much more free space. Better than other tools, NIUBI Partition Editor has Virtual Mode, Cancel-at-will, 1-Second Rollback and Hot-Clone technology to protect your system and data. Therefore, you can move free space to C drive without losing data. Everything keeps the same with before exept partition size.

Download NIUBI Partition Editor and follow the methods in the video to extend C drive.

Expand C drive

Besides resizing partition in Windows Server 2022/2019/2016/2012/2008/2003, this tool helps you do many other disk partition management.

You'd better expand C drive as large as possible. There are two additional suggestions:

  1. Don't install all programs to C drive, move default "Download" and output path of programs to other partition.
  2. Run Disk Cleanup in Windows Server 2022 monthly to remove new generated junk files.