In Windows 10, Windows 8 and Windows 7, you can start Disk Cleanup with all items checked by default. While the application does not remember the user's choices from the last launch, you can have all options enabled with a special command line argument. Let's see how it can be done.
In my previous article, I reviewed Disk Cleanup (cleanmgr.exe) command line arguments in detail. See the following article:
Cleanmgr.exe command line arguments
One of its options, /LOWDISK, is exactly what we need.
This switch is used when Windows notifies the user that he is running out of space on a drive. When you click the notification, the Disk Cleanup opens with all checkboxes checked by default.
If you start it under your regular user account, the following items will be checked by default:
- Downloaded Program Files
- Temporary Internet Files
- Offline webpages
- System created temporary Windows Error reports
- Delivery Optimization Files
- Recycle bin
- Temporary files
- Thumbnails
If you start it from an elevated command prompt or you have disabled UAC in Windows 10, the Disk Cleanup tool will be started in system files mode which extends the item list to the the following values:
- Windows Defender
- Downloaded Program Files
- Temporary Internet Files
- Offline webpages
- Files discarded by Windows upgrade
- System archived Windows Error reports
- System created temporary Windows Error reports
- Deliver Optimization Files
- Device driver packages
- Recycle Bin
- Temporary Files
- Thumbnails
All options will be checked by default.
So, here is how it can be done.
Start disk cleanup with all items checked
- Press Win + R shortcut keys on the keyboard to open the run dialog.
See these articles for more shortcuts like this: - Type or copy-paste the following command in the Run box:
cleanmgr.exe /LOWDISK
- Hit the Enter key. The following window will be opened:
All options available under the regular user account will be checked by default.
If you click the OK button, the checked items will be removed from your hard disk. This will save your time and allow you to clean up your disk drive faster.
Start Disk Cleanup with all items checked in system files mode
- Open an elevated command prompt.
- Type the following and press Enter:
cleanmgr.exe /LOWDISK
- The following window will appear on the screen:
There, all the options will be ticked by default. Once you click the OK button, all the checked items will be cleaned up.
To save your time, you can create shortcuts to launch the Disk Cleanup tool in both regular and "system files" mode. Here is how it can be done.
Create a shortcut to run Disk Cleanup in the regular mode with all items checked
- Right click the Desktop and select New - Shortcut.
- In the shortcut target box, type or copy-paste the following command:
cleanmgr.exe /LOWDISK
- Specify the desired name of your shortcut and you are done.
You can right click the shortcut you just created and select "Run as administrator" to start Disk Cleanup in system files mode and confirm the UAC prompt to run it.
Alternatively, you can create a shortcut to run Disk Cleanup in system files mode without the UAC prompt. It's a more complex procedure, since you will need to create a special Task Scheduler task. But the good news is that you can automate the process with Winaero Tweaker. Let's see how it can be done.
Create a shortcut to run Disk Cleanup in system files mode with all items checked
First of all, I suggest you to read the following article:
Create elevated shortcut to skip UAC prompt in Windows 10
Read it carefully. It perfectly describes how to create an elevated task in Task Scheduler. In short, you need to do the following.
- Open the Start menu and go to Windows Administrative Tools - Task Scheduler:
Tip: See How to navigate apps by alphabet in Windows 10 Start menu - In Task Scheduler, click the item "Task Scheduler Library" in the left pane. Then in the right pane, click on the link "Create task".
- A new window titled "Create Task" will be opened. On the "General" tab, specify the name of the task. Pick an easily recognizable name like "Disk Cleanup (system files mode)".
You can also fill in the description if you want.
Tick the checkbox named "Run with highest privileges". - Switch to the "Actions" tab. There, click the "New..." button. In the next dialog, enter "clearmgr.exe" in the Program/Script box, and "/LOWDISK" in the parameters box. Type these values without quotes as shown below:
- On the "Conditions" tab, untick the option "Start the task only if the computer is on AC power":
- Finally, you can create a new shortcut to launch the Disk Cleanup (system files mode) task with one click.
Right click the desktop and select New - Shortcut in the context menu.
Use the following command as the shortcut target:schtasks /run /tn "Disk Cleanup (system files mode)"
- Name your shortcut as you wish. For example, it can be Disk Cleanup (system files mode):
- You can change its icon to the one from the c:\windows\system32\cleanmgr.exe file:
- Now click the shortcut. The Disk Cleanup tool will open directly in system files mode:
You can save a lot of time by using Winaero Tweaker. Install the app and go to Tools - Elevated Shortcut. Fill in the text boxes as shown below and you are done!
It is very time saving than working with Task Scheduler.
That's it.
Did you find this trick useful? Do you have any questions about Disk Cleanup? Tell us in the comments.
Support us
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
You could of course also just use ccleaner + enhancer
Indeed, but this is a third party tool.
True (a)
would this work to remove Windows.old folder after a fresh install?
I hope so