How to delete temporary files using Disk Cleanup on Windows 10

Reading time icon 5 min. read


Readers help support Windows Report. When you make a purchase using links on our site, we may earn an affiliate commission. Tooltip Icon

Read the affiliate disclosure page to find out how can you help Windows Report effortlessly and without spending any money. Read more

Key notes

  • Removing unnecessary items is a great routine in order to avoid getting errors on your device.
  • There are several ways to do that and in this article, we will explore which ones are best to use.
  • Check out for more helpful guides in our dedicated How-To Hub.
  • Make sure to explore our Windows 10 Troubleshooting Hub as well to keep your PC error-free at all times.
How to delete temporary files using Disk Cleanup on Windows 10

In order to install or run certain applications, Windows often creates temporary files on your computer.

Temporary files have their purpose, but once you’re done using the application, there’s usually no more reason to keep the files.

These files can sometimes take a lot of space, and today we’re going to show you how to remove these files using Disk Cleanup on Windows 10.

How can I delete temporary files using Disk Cleanup?

1. Use Disk Cleanup to remove temporary files

1.1. Start Disk Cleanup from the menu

  1. Press Windows Key + S and enter disk cleanup.
  2. Choose Disk Cleanup from the menu.
  3. When the Disk Cleanup tool starts, select your system drive. By default it should be C:.
  4. Disk Cleanup will now scan your system drive for any unnecessary files.
  5. Check Temporary files and click on OK

  6. Wait while the tool removes the selected files from your PC.

After the process is finished, all temporary files should be removed from your PC.

1.2. Start the Disk Cleanup tool by using the Run dialog.

  1. Press Windows Key + R and enter cleanmgr.
  2. Now press Enter or click OK.
  3. Optional: You can also choose the drive you want to scan right from the Run dialog. To do that, simply enter cleanmgr /d C and Disk Cleanup will automatically scan your C drive.

1.3. Start Disk Cleanup by using Command Prompt or PowerShell.

  1. Press Windows Key + X to open the Win + X menu and choose Command Prompt (Admin).
  2. If Command Prompt isn’t available, you can use PowerShell instead.
  3. Enter cleanmgr command to start Disk Cleanup. You can also use cleanmgr /d C command to automatically scan the C drive.

1.4. Start Disk Cleanup is to use the Settings app

  1. Press Windows Key + I to open the Settings app.
  2. In the Find a setting field enter disk and choose to Free up disk space by deleting unnecessary files.

1.5. Start Disk Cleanup using the Control Panel.

  1. Press Windows Key + S and enter control panel.
  2. Now choose Control Panel from the list.
  3. Go to the Administrative Tools section.
  4. Locate and run Disk Cleanup.

1.6. Start Disk Cleanup by searching for it in Control Panel.

  1. Type disk cleanup in the search bar at the top right corner.
  2. Choose Free up disk space by deleting unnecessary files option.

1.7. Start Disk Cleanup simply by locating your hard drive.

  1. Navigate to This PC.
  2. Locate your system drive, by default it should be a C drive.
  3. Right-click it and choose Properties.
  4. When the Properties window opens, click on Disk Cleanup.

Note: After you start Disk Cleanup, simply follow the instructions from the beginning of this solution to remove the temporary files.

2. Make Disk Cleanup remove all temporary files

  1. Press Windows Key + R and enter regedit.
  2. Press Enter or click OK.
  3. Optional: Modifying the registry can cause problems, especially if you don’t do it properly, therefore it’s highly recommended to back it up. To do that, go to File and select Export.
  4.  Set Export range as All and enter the desired file name. Choose a safe location and click on Save.
  5. In the left pane navigate to HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerVolumeCachesTemporary Files.
  6. In the right pane, double click on LastAccess DWORD.
  7. Set the Value data to 0 or to any other value less than 7.
  8. Click on OK to save changes.

Note: Keep in mind that you won’t be able to delete protected files or files that are in use, but most other files should be deleted without any problems.

3. Use a trird-party software

The simplest and fastest way to remove temporary files from your PC is to use software like Ashampoo WinOptimizer.

This is a useful tool that will scan your drive and allow you to choose the type of files you wish to remove. There is a wide array of files to choose from, and among these files, there are also temporary files.

Ashampoo WinOptimizer comes with a complete tuneup and 37 cleaning suite modules that will make sure your device is kept secure with deep scans and repair tools.

Moreover, if you accidentally delete files or if you want to permanently get rid of others, this system optimization software will do the job in no time.

Here are some of its key features

  • Cleaning and diagnosis.
  • Removes all junk data or broken shortcuts.
  • Defrag tool.
  • Intuitive and comprehensive dashboard.
  • Privacy control features and Antispy option.

⇒ Get Ashampoo WinOptimizer

4. Automate Disk Cleanup

  1. Press Windows Key + R and enter cleanmgr /d c: /sageset:1000.
  2. Click OK or press Enter.
  3. Check Temporary files and Temporary Internet Files options and click on OK.
  4. Now press Windows Key + R again and enter cleanmgr /sagerun:1000.
  5. Press Enter or click OK to run the command.

After running this command, temporary files should be deleted automatically.

This is one of the fastest ways to delete temporary files using Disk Cleanup, but as you can see, it requires some configuration before you can use it.

And there you have a few methods that will help you delete temporary data files. If you have other suggestions or recommendations, make sure to let us know in the comments section below.

More about the topics: Disk Cleanup, windows 10