Geeks in Phoenix

Geek Blog


Clean up Windows 10 with Disk Cleanup

There are a lot of programs out there that can clean up your Windows 10 computer. But did you know that one of the best ones comes with Windows 10? Here's how to clean up your Windows 10 computer with Disk Cleanup.

Clean up Windows 10 with Disk Cleanup

Disk Cleanup has been included with Windows since Windows XP and is part of my regular scheduled maintenance. Disk Cleanup can be run two (2) different ways and can have three (3) different sets of options. The first way to run it is from any of the shortcuts built into Windows (Start menu or disk properties). When you use a built-in shortcut, you will have two (2) different sets of options, user and system.

Disk Cleanup user options in Windows 10
Disk Cleanup user options in Windows 10
Disk Cleanup system options in Windows 10
Disk Cleanup system options in Windows 10

When you run Disk Cleanup with user options, you can clean up user-specific files such as downloaded program files, temporary Internet files, and the recycle bin. With system options, you can also clean up Windows system files like Windows temporary files, device driver packages, and previous installations of Windows, just to name a few.

Disk Cleanup command line options in Windows 10
Disk Cleanup command line options in Windows 10

Disk Cleanup can also be run using command line switches. When you do this, you get the maximum options available. But you will have to run it at an administrative command prompt to configure these options. These options include all user and system options plus a few more, like old chkdsk files, Windows Update Cleanup, and Windows ESD installation files.

How to run Disk Cleanup from the Start menu

  1. Left-click on the Start Windows logo button.
  2. Scroll down to Windows Administrative Tools and left-click to expand.
  3. Left-click on Disk Cleanup. If you have more than one (1) drive, you will be prompted on which drive you want to clean up.

Disk Cleanup will scan your system for files that it can remove and open with the available user options. You can now choose which user files you would like to delete. To activate the system options, you will need to select Clean up system files in the lower left-hand corner. When you do this, Disk Cleanup will close and rescan your computer.

This time Disk Cleanup will now include system files that can be removed. It will also have a second tab on top called More Options. Under More Options, you will find other options, Programs and Features and System Restore and Shadow Copies.

Programs and Features will take you to the Control Panel, where you can uninstall programs or add/remove Windows features. Selecting System Restore and Shadow Copies will delete all but the most recent restore point. Use this carefully, as you cannot get back any restore points once they are deleted.

How to run Disk Cleanup from an administrative command prompt

You can run Disk Cleanup with or without command-line switches. When you run Disk Cleanup without any switches, it opens with the system options selections. When you run it with switch /sageset:n, you will get even more options than the system settings.

The first thing you will need to do is open an Administrative Command Prompt.

How to open a Command Prompt with Administrator privileges in Windows 10

Then type the following into the command prompt to run Disk Cleanup.

cleanmgr

Disk Cleanup can also be used with command-line switches, further expanding on its features. And when used with the /sageset:n and /sagerun:n switches, you can save multiple configurations that can be used in a shortcut or as a scheduled task. Here's an explanation of the /sageset:n and /sagerun:n switches.

cleanmgr /sageset:n

/sageset:n - This switch displays the Disk Cleanup settings dialog box and creates a registry key to store the settings you select. The n value is stored in the registry and allows you to specify different tasks for Disk Cleanup to run. The n value can be any integer value from 0 to 65535. To get all the available options when using the /sageset switch, you may need to specify the drive letter that contains the Windows installation.

cleanmgr /sagerun:n

/sagerun:n - This switch runs the specified tasks assigned to the n value by using the /sageset switch. All drives in the computer will be enumerated, and the selected profile will be run against each drive.

How to run Disk Cleanup as a Scheduled Task

First, you will need to have created a preset configuration using the /sageset:n switch. Then open Task Scheduler and create a new task.

  1. Left-click on the Start Windows logo button.
  2. Scroll down to Windows Administrative Tools and left-click to expand.
  3. Left-click on Task Scheduler.
  4. In the right column labeled Actions, select Create Basic Task. The Create a Basic Task Wizard will appear.
  5. Give the task a name and description and then select Next.
  6. Select when you want it to run (trigger).
  7. When prompted for what task you want to perform, select Start a program, then select Next.
  8. When prompted for a program/script to start, select Browse and navigate to C:\Windows\System32\ and select cleanmgr.exe.
  9. In the Add arguments section, type /sagerun:n and then select Next.
  10. Then select Finish, and you're all set.

Comments (1) -

Great video! Windows 10 has some good things in the upgrade, but it's important to learn how to do things like disk cleanup now. Thanks for sharing!

Reply

Add comment

Free computer diagnostics

Repairing a PC can sometimes be expensive, and that is why we offer free basic in-shop diagnostics. Give one of our professional and experienced technicians a call at (602) 795-1111, and let's see what we can do for you.

Check out our reviews

Geeks In Phoenix LLC, BBB Business Review

Customer service is #1

Here at Geeks in Phoenix, we take pride in providing excellent customer service. We aim to give the highest quality of service  from computer repair, virus removal, and data recovery.

Bring your computer to us and save

Repairing a computer can be time-consuming. That is why we base our in-shop service on the time we work on your computer, not the time it takes for your computer to work! From running memory checking software to scanning for viruses, these are processes that can take some time.

Contact us

If you have any questions, please feel free to give us a call at (602) 795-1111  and talk with one of our Geeks. Or you can send us a message from our contact page contact page , and one of our Geeks will get back to you as soon as possible. Or you can stop by and see us. Here are our hours and location.

Like Geeks in Phoenix on Facebook

Follow Geeks in Phoenix on Twitter

Watch Geeks in Phoenix on YouTube