As with previous versions, the C: drive running out of space is also an issue in Windows Server 2022. When this happens, you may want to clean up the C: drive to reclaim disk space. By deleting junk and unnecessary files, you can free up more space on the C: drive. To do this, you can use the built-in "Disk Cleanup" tool in Server 2022 or third-party software. Disk Cleanup is sufficient to accomplish this task. This article explains how to run Disk Cleanup in Windows Server 2022 to clean up the C: drive. If you cannot reclaim enough disk space, it's recommended to add more free space to the C: drive from another partition on the disk.
How to run Disk Cleanup in Windows Server 2022
There are two ways to open Disk Cleanup in Windows Server 2022:
- Open File Explorer, right click C: drive and click "Properties". In the pop-up window, click Disk Cleanup.
- Press Windows + R keys, type cleanmgr and press Enter. C: drive is selected by default, simply click OK to continue.
The same window will be opended.
How to clean up C drive in Server 2022 with Disk Cleanup tool:
- Click the check-box in front of the files that you want to delete and then click OK.
- Click "Delete Files" in next dialog box 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
- Press Windows + R together to open Run.
- Type cleanmgr /LOWDISK and press Enter.
- 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
- Press Windows + R together on the keyboard.
- 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
- Press Windows + R together on the keyboard to open Run.
- Type cleanmgr /sageset:1 and press Enter. (You can specify the value from 0 to 65535).
- Disk Cleanup dialog box will pop up, select the files to delete and click OK.
- 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 have never freed up disk space before, you may gain over 10GB of free space on the C: drive. However, this is usually not enough in most cases. New junk files continue to accumulate on the C: drive, and this free space will be quickly used up. If you don't want to see the C: drive fill up again in the near future, it's better to add more space from another partition.
With safe disk partition software, you can shrink another partition on the same disk. The free space in that partition will be released and converted into unallocated space. You can then add this unallocated space to the C: drive, giving you much more free space. Better than other tools, NIUBI Partition Editor offers Virtual Mode, Cancel-at-will, 1-Second Rollback, and Hot-Clone technology to protect your system and data. You can move free space to the C: drive without losing any data. Everything remains the same as before, except for the partition size.
Download NIUBI Partition Editor and follow the steps in the video to extend 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:
- Don't install all programs to C drive, move default "Download" and output path of programs to other partition.
- Run Disk Cleanup in Windows Server 2022 monthly to remove new generated junk files.