Geeks in Phoenix

Geek Blog


Clean up Windows 11 with Storage Sense and Disk Cleanup

Updated January 16, 2024

Are you running out of free space on your Windows 11 computer? Or maybe you would like to clean up all the clutter that can build up over time? If so, here is how to clean and free up space on Windows 11 using Storage Sense and Disk Cleanup.

Clean up Windows 11 with Storage Sense and Disk Cleanup

Windows 11 has two (2) built-in programs that you can use to clean up Windows 11: Storage Sense and Disk Cleanup. They both have similar features, and they both can be run manually or automatically.

Note: Both of these programs will permanently delete files on your computer, so you need to be careful what you decide to clean up. Remember, once you delete a file or files with either one of these programs, you cannot get them back.

Storage Sense

The Storage Sense feature inside of Windows 11 Settings

Storage Sense is relatively new, as it first appeared in Windows 10 version 1809. It is simple to use, as it only has a few settings that you can change.

Storage Sense can be run automatically when your computer starts to run out of free space or every day, week, or month. It can delete files in your Recycle Bin and Downloads folder based on how long those files have been there. You can run Storage Sense manually, too.

How to open Storage Sense in Windows 11

  1. Left-click on the Start Windows logo key button to bring up the Start menu.
  2. In the list of pinned apps on the Start menu, left-click on Settings.
  3. In the left-hand column, left-click on System.
  4. Scroll down the right-hand column and left-click on Storage.
  5. In the right-hand column, left-click on Storage Sense.

Disk Cleanup

The Disk Cleanup program inside of Windows 11

Disk Cleanup has been inside Windows for some time now and has far more options for cleaning up Windows 11. And there are two (2) ways to run Disk Cleanup, which I refer to as Standard and Advanced.

Disk Cleanup can clean up user and system files, ranging from the Recycle Bin and temporary Internet files for users to Windows Update and thumbnails for the system.

The Standard way to run Disk Cleanup

  1. Left-click on the Start button Windows logo to bring up the Start menu.
  2. In the upper right-hand corner of the Start menu, left-click on All apps.
  3. Scroll down the list of programs and left-click on Windows Tools.
  4. Left-click on Disk Cleanup.

or

  1. Open File Explorer using one of the following:
    • Left-click on the File Explorer icon (manilla folder) on the Taskbar.
    • Press the Windows logo key Windows logo + E at the same time.
    • Use the Power User menu by right-clicking on the Start Windows logo button and selecting File Explorer.
  2. In the left-side column, left-click on This PC.
  3. In the right-side column, right-click on the drive you want to optimize and select Properties.
  4. On the General tab, left-click on the Disk Cleanup button.

If you started Disk Cleanup from the Windows Tools shortcut and have more than one (1) drive inside your computer, you may be prompted for which drive you want to clean up.

From the dialog box that appears, you will see a list of user files that can be deleted. If you are looking to clean up your user profile, select the files you want to delete and left-click on the OK button.

If you want to clean up system files, then left-click on the Clean up system files button. If this is the drive with Windows installed on it, you will have several more file options to choose from. Select the files you want to clean up and left-click on the OK button.

The Advanced way to run Disk Cleanup

Using the advanced way of starting Disk Cleanup will give you all of the user and system settings options. And you can also use Task Scheduler to run the advanced Disk Cleanup settings on a schedule you set.

The first thing you need to do is open a Command Prompt with Administrator privileges. Note: The full name of Disk Cleanup is cleanmgr.exe, but you only need to use cleanmgr in the Admin Command Prompt.

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

In the Admin Command Prompt, type the following and then press Enter.

cleanmgr

This will start Disk Cleanup, just like starting it from the Windows Tools shortcut. But you can use command-line switches to get all of the options (user and system). You can use several different command-line switches with cleanmgr, but you will only need to use two: /sageset:n and /sagerun:n.

cleanmgr /sageset:n

/sageset:n - This switch displays the Disk Cleanup settings dialog box and creates a registry key to store your selected settings. 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 using the /sageset switch. All drives in the computer will be enumerated, and the selected profile will be run against each drive.

How to create a Scheduled Task to run Disk Cleanup

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

You can also create a shortcut with the cleamgr /sagerun:n command, that way, you can run it manually whenever you want.

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