Windows will take a few moments to clean up your files, and then you'll see a message indicating how much disk space has been freed up. Free up space with Disk Cleanup If your system doesn't have Storage sense, you can use the Disk Cleanup tool to delete temporary files and system files from your device. Smart Disk Cleanup provides a safe and easy way to clean up junk files, duplicates, and large files. In just a few minutes you can safely and easily free up GBs of disk space. Items cleaned with Smart Disk Cleanup: Duplicates - Unnecessary duplicate files can take up GBs of disk space. In the search box on the taskbar, type disk cleanup, and select Disk Cleanupfrom the list of results. Select the drive you want to clean up, and then select OK. Under Files to delete, select the file types to get rid of. To get a description of the file type, select it. This video shows you, How to Clean C Drive (Local Disk C) In Windows 10 for more free space, better load times, and increased system performance!
The built-in Windows tool, Disk Cleanup, which can be launched as cleanmgr.exe from the Run dialog, supports a number of interesting command line arguments which can be useful in various situations. Let's review them and see how you can use them.
You can learn the switches available for Disk Cleanup by entering the following command in the Run dialog:
See the following screenshot:
The list is as follows:
Here's what those switches mean.
cleanmgr.exe /D DRIVELETTER
Executes disk cleanup for a specific drive. The user should specify the drive letter without ':' as shown below:
The command above will launch disk cleanup for drive C:.
You can combine the /D argument with other switches of cleanmgr.exe.
cleanmgr.exe /SAGESET
The SAGESET key allows you to create a preset of selected checkboxes in cleanmgr.exe. Once this is done, you can launch the preset using the /SAGERUN option. The syntax is as follows:
The command needs to be executed elevated (as administrator).
Where 'number' can be any value from 0 to 65535. The options you select during the SAGESET session will be written to the Registry and stored there for further use. The command needs to be executed elevated.
Use it as follows:
- Open an elevated command prompt.
- Type the following command
Suppose you use the number 112, for example:
- Tick the options you want to be enabled for this preset as shown below:
- Click OK to save the preset under the number you entered in the Run dialog.
Since you started cleanmgr.exe /SAGESET:n elevated, it will be opened directly in the 'Clean up system files' mode. See the following article: How to run Disk Cleanup directly in the system files mode and speed it up.
Technically, every checkbox shown in Disk Cleanup reflects the appropriate registry subkey under the following Registry branch:
For example, the Windows Upgrade Log Files subkey reflects the same option in the user interface of the app.
For every value you check, it will be marked under the StateFlagsNNNN DWORD value, where NNNN is a number you passed to the SAGESET argument. I have the value StateFlags0112 there for my /SAGESET:112 command:
cleanmgr.exe /SAGERUN
The argument /SAGERUN allows the user to launch the preset configured earlier with the /SAGESET:n command. The syntax is as follows:
Use the same number that you used for the previous /SAGESET:number command.
Combining with the previous example, you should do the following.
- Open an elevated command prompt.
- Type the following command
Suppose you use the number 112, for example:
- Tick the options you want to be run for this preset as shown below:
- Click OK to save the preset under number 112.
- Now, type cleanmgr.exe /SAGERUN:112 in the Run dialog. It will start clean up using the preselected options automatically.
The cleanup process will be started immediately, without any confirmation prompt. Disk Cleanup will also be closed automatically.
If the /D argument is not specified for this command, it will be applied to all drives.
You can see the article How to run Disk Cleanup directly in the system files mode and speed it up.
The following commands are not documented. To discover them, I used Sysinternals Process Monitor and logs of the cleanmgr utility. If they don't behave as described, please correct me in the comments.
cleanmgr.exe /TUNEUP
The command is similar to the described SAGESET functionality. In Windows 10, it does exactly the same thing. Like the SAGESET switch, it writes presets to the Registry. It can be used instead of SAGESET. The syntax is as follows:
The command needs to be executed elevated.
If you previously configured the number specified with the TUNEUP switch with SAGESET, it will reflect the changes you made:
This switch is not documented, so Microsoft can remove or change its behavior at any moment. I recommend you to use SAGESET instead.
cleanmgr.exe /LOWDISK
This switch is used when Windows notifies the user that he is running out of disk space on a drive. When you click the notification, Disk Cleanup opens with all checkboxes checked by default. You can execute it from the Run dialog as follows:
See the following screenshot:
Disk Cleanup Windows 10 Free Download
Once you press the Enter key, it will analyze the drive and show the familiar user interface, but with all checkboxes checked by default:
You can run the command from an elevated command prompt to make it switch to the system files mode.
cleanmgr.exe /VERYLOWDISK
It is the same as the /LOWDISK disk switch, but it will cleanup 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.
Syntax:
Run the command from the elevated command prompt to make it switch to the system files mode.
cleanmgr.exe /SETUP
The setup switch analyzes the system files left from a previous Windows version. For example, if you upgraded from Windows 7 to Windows 10, running this switch is useful. It also needs to be executed from an elevated command prompt:
The application will calculate the space used by files from the previous Windows installation. It is similar to the cleaning Previous Windows Installation files using the user interface of Disk Cleanup in regular mode. The application will analyze the following locations:
The application will not clean them up automatically. It won't show a user interface either. Instead it will write two log files which you can inspect:
cleanmgr.exe /AUTOCLEAN
It's the same as above, but the application will remove files from the previous Windows installation or the previous in-place upgrade automatically.
The following folders will be removed:
The application will write the results to the following log files:
No user interface will be shown.
The syntax is as follows:
The command needs to be executed elevated, e.g. you need to launch it from an elevated command prompt instance.
Disk Cleanup On Windows 10 Lenovo
That's it.
Don't forget to tell us if some commands don't behave as described for you. Feel free to leave a comment if you have a question or a suggestion.
See the following screenshot:
The list is as follows:
Here's what those switches mean.
cleanmgr.exe /D DRIVELETTER
Executes disk cleanup for a specific drive. The user should specify the drive letter without ':' as shown below:
The command above will launch disk cleanup for drive C:.
You can combine the /D argument with other switches of cleanmgr.exe.
cleanmgr.exe /SAGESET
The SAGESET key allows you to create a preset of selected checkboxes in cleanmgr.exe. Once this is done, you can launch the preset using the /SAGERUN option. The syntax is as follows:
The command needs to be executed elevated (as administrator).
Where 'number' can be any value from 0 to 65535. The options you select during the SAGESET session will be written to the Registry and stored there for further use. The command needs to be executed elevated.
Use it as follows:
- Open an elevated command prompt.
- Type the following command
Suppose you use the number 112, for example:
- Tick the options you want to be enabled for this preset as shown below:
- Click OK to save the preset under the number you entered in the Run dialog.
Since you started cleanmgr.exe /SAGESET:n elevated, it will be opened directly in the 'Clean up system files' mode. See the following article: How to run Disk Cleanup directly in the system files mode and speed it up.
Technically, every checkbox shown in Disk Cleanup reflects the appropriate registry subkey under the following Registry branch:
For example, the Windows Upgrade Log Files subkey reflects the same option in the user interface of the app.
For every value you check, it will be marked under the StateFlagsNNNN DWORD value, where NNNN is a number you passed to the SAGESET argument. I have the value StateFlags0112 there for my /SAGESET:112 command:
cleanmgr.exe /SAGERUN
The argument /SAGERUN allows the user to launch the preset configured earlier with the /SAGESET:n command. The syntax is as follows:
Use the same number that you used for the previous /SAGESET:number command.
Combining with the previous example, you should do the following.
- Open an elevated command prompt.
- Type the following command
Suppose you use the number 112, for example:
- Tick the options you want to be run for this preset as shown below:
- Click OK to save the preset under number 112.
- Now, type cleanmgr.exe /SAGERUN:112 in the Run dialog. It will start clean up using the preselected options automatically.
The cleanup process will be started immediately, without any confirmation prompt. Disk Cleanup will also be closed automatically.
If the /D argument is not specified for this command, it will be applied to all drives.
You can see the article How to run Disk Cleanup directly in the system files mode and speed it up.
The following commands are not documented. To discover them, I used Sysinternals Process Monitor and logs of the cleanmgr utility. If they don't behave as described, please correct me in the comments.
cleanmgr.exe /TUNEUP
The command is similar to the described SAGESET functionality. In Windows 10, it does exactly the same thing. Like the SAGESET switch, it writes presets to the Registry. It can be used instead of SAGESET. The syntax is as follows:
The command needs to be executed elevated.
If you previously configured the number specified with the TUNEUP switch with SAGESET, it will reflect the changes you made:
This switch is not documented, so Microsoft can remove or change its behavior at any moment. I recommend you to use SAGESET instead.
cleanmgr.exe /LOWDISK
This switch is used when Windows notifies the user that he is running out of disk space on a drive. When you click the notification, Disk Cleanup opens with all checkboxes checked by default. You can execute it from the Run dialog as follows:
See the following screenshot:
Disk Cleanup Windows 10 Free Download
Once you press the Enter key, it will analyze the drive and show the familiar user interface, but with all checkboxes checked by default:
You can run the command from an elevated command prompt to make it switch to the system files mode.
cleanmgr.exe /VERYLOWDISK
It is the same as the /LOWDISK disk switch, but it will cleanup 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.
Syntax:
Run the command from the elevated command prompt to make it switch to the system files mode.
cleanmgr.exe /SETUP
The setup switch analyzes the system files left from a previous Windows version. For example, if you upgraded from Windows 7 to Windows 10, running this switch is useful. It also needs to be executed from an elevated command prompt:
The application will calculate the space used by files from the previous Windows installation. It is similar to the cleaning Previous Windows Installation files using the user interface of Disk Cleanup in regular mode. The application will analyze the following locations:
The application will not clean them up automatically. It won't show a user interface either. Instead it will write two log files which you can inspect:
cleanmgr.exe /AUTOCLEAN
It's the same as above, but the application will remove files from the previous Windows installation or the previous in-place upgrade automatically.
The following folders will be removed:
The application will write the results to the following log files:
No user interface will be shown.
The syntax is as follows:
The command needs to be executed elevated, e.g. you need to launch it from an elevated command prompt instance.
Disk Cleanup On Windows 10 Lenovo
That's it.
Don't forget to tell us if some commands don't behave as described for you. Feel free to leave a comment if you have a question or a suggestion.
Advertisment