How to delete temporary files using Disk Cleanup on Windows 10, 8, 7

Milan Stanojevic avatar. By: Milan Stanojevic
6 minute read

Home » How to delete temporary files using Disk Cleanup on Windows 10, 8, 7

In order to install or run certain applications, Windows often creates temporary files on your computer. Temporary files are useful, but once you’re done using the application, there’s usually no more use for these 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 to quickly and easily delete temporary files using Disk Cleanup?

Solution 1 – Use Disk Cleanup to remove temporary files

The simplest and the fastest way to remove temporary files from your PC is to use Disk Cleanup feature. 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. To use Disk Cleanup tool, do the following:

  1. Press Windows Key + S and enter disk cleanup. Choose Disk Cleanup from the menu. Alternatively, you can just open the Start Menu and enter disk cleanup to search for it.
  2. When Disk Cleanup tool starts, you need to select your system drive. By default it should be C:.
  3. Disk Cleanup will now scan your system drive for any unnecessary files. This can take a while depending on the size of your disk, so be patient.
  4. Now you’ll see a list of files along with the amount of space they take. Check Temporary files and click on OK. If you want, you can also check Temporary Internet Files.

  5. 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. You can also start Disk Cleanup tool by using the Run dialog. To do that, follow these steps:

  1. Press Windows Key + R and enter cleanmgr. Now press Enter or click OK.
  2. 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.

You can also start Disk Cleanup by using Command Prompt or PowerShell. To do that, follow these steps:

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

Another way to start Disk Cleanup is to use the Settings app. To do that, you need to follow these simple steps:

  1. Press Windows Key + I to open the Settings app.
  2. When Settings app opens, in the Find a setting field enter disk and choose Free up disk space by deleting unnecessary files. After doing that, Disk Cleanup tool will start.

If you want, you can also start Disk Cleanup using the Control Panel. To do that, simply follow these steps:

  1. Press Windows Key + S and enter control panel. Now choose Control Panel from the list.
  2. When Control Panel opens, go to Administrative Tools section. List of applications will now appear. Locate and run Disk Cleanup.
  3. Optional: You can also access Disk Cleanup simply by searching for it in Control Panel. To do that, type disk cleanup in the search bar at the top right corner and choose Free up disk space by deleting unnecessary files option.

You can also start Disk Cleanup simply by locating your hard drive and checking its properties. To do that, follow these simple steps:

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

As you can see, there are several methods you can use to start Disk Cleanup, so feel free to use any method that works for you. After you start Disk Cleanup, simply follow the instructions from the beginning of this solution to remove the temporary files.

Solution 2 – Make Disk Cleanup remove all temporary files

Disk Cleanup is a powerful tool, but it has certain limitations. By default, this tool can’t remove any files that have read-only, system or hidden attributes. Windows considers these files important, so it won’t remove them with Disk Cleanup. In addition, this tool won’t remove files that have been accessed in last seven days. Lastly, Disk Cleanup won’t remove any directories created in last seven days because you might need them in the future.

Even though you can’t remove files that are in use, you can modify your registry and allow Windows to remove temporary files that have been used less then seven days ago. To do that, follow these steps:

  1. Press Windows Key + R and enter regedit. Press Enter or click OK.
  2. 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 > Export.
    Set Export range as All and enter the desired file name. Choose a safe location and click on Save.
    If anything goes wrong, you can run that file in order to restore your registry to the original state.
  3. In the left pane navigate to HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerVolumeCachesTemporary Files key. In the right pane, double click on LastAccess DWORD.
  4. Set the Value data to 0 or to any other value less than 7. By doing that, all files that haven’t been access for the specified number of days will be deleted. You can use 0 to delete all files, but some users claim it’s better to use a value such as 3 just to be safe. After entering the desired value, click on OK to save changes.

Now you should be able to delete most temporary files using Disk Cleanup. 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.

Solution 3 – Automate Disk Cleanup

If you want to speed this process up, you can easily automate Disk Cleanup. To do that, you need to follow these steps:

  1. Press Windows Key + R and enter cleanmgr /d c: /sageset:1000. Click OK or press Enter.
  2. Disk Cleanup Settings window will appear. Check Temporary files and Temporary Internet Files options. Now click on OK.
  3. Now press Windows Key + R again and enter cleanmgr /sagerun:1000. 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. In the future, if you want to clean temporary files automatically, you just have to run cleanmgr /sagerun:1000 command.

Disk Cleanup is a useful feature of Windows that allows you to remove unnecessary files with ease. The application can remove all sorts of files, including your temporary files. Since temporary files can take a lot of space, feel free to remove them by using any of our solutions.

READ ALSO:

 

Discussions

Next up

KB4471331 fixes major Adobe Flash Player zero-day vulnerability

Giles Ensor avatar. By: Giles Ensor
2 minute read

Microsoft has released an update for Adobe Flash Player, that was described in Adobe’s Security Bulletin which was released December 7th, 2018. The update fixes […]

Continue Reading

You’ll be able to install Chrome extensions on Edge in the future

Giles Ensor avatar. By: Giles Ensor
2 minute read

It looks like we are now going to be enjoying constant updates, Reddit discussion comments, and rumours and gossip about the new Chromium-based Microsoft Edge […]

Continue Reading

5 USB Christmas decorations for a cozy and merry desk

Madeleine Dean By: Madeleine Dean
Less than a 1 minute read

Having a nice Christmas tree in your house helps you to bring the winter holiday mood to your home. You can also bring this mood […]

Continue Reading