- 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.
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 Ashampoo Win Optimizer
The simplest and fastest way to remove temporary files from your PC is to use 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 the deep scans and repair tools.
Moreover, if you accidentally deleted 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.
Ashampoo WinOptimizerClean, defrag, recover, and repair with a one-of-a-kind system optimization software.
2. Use Disk Cleanup to remove temporary files
2.1. Start Disk Cleanup from the menu
- Press Windows Key + S and enter disk cleanup.
- Choose Disk Cleanup from the menu.
- When the Disk Cleanup tool starts, select your system drive. By default it should be C:.
- Disk Cleanup will now scan your system drive for any unnecessary files.
- Check Temporary files and click on OK.
- 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.
2.2. Start the Disk Cleanup tool by using the Run dialog.
- Press Windows Key + R and enter cleanmgr.
- Now press Enter or click OK.
- 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.
2.3. Start Disk Cleanup by using Command Prompt or PowerShell.
- Press Windows Key + X to open the Win + X menu and choose Command Prompt (Admin).
- If Command Prompt isn’t available, you can use PowerShell instead.
- Enter cleanmgr command to start Disk Cleanup. You can also use cleanmgr /d C command to automatically scan the C drive.
2.4. Start Disk Cleanup is to use the Settings app
- Press Windows Key + I to open the Settings app.
- In the Find a setting field enter disk and choose to Free up disk space by deleting unnecessary files.
2.5. Start Disk Cleanup using the Control Panel.
- Press Windows Key + S and enter control panel.
- Now choose Control Panel from the list.
- Go to the Administrative Tools section.
- Locate and run Disk Cleanup.
2.6. Start Disk Cleanup by searching for it in Control Panel.
- Type disk cleanup in the search bar at the top right corner.
- Choose Free up disk space by deleting unnecessary files option.
2.7. Start Disk Cleanup simply by locating your hard drive.
- Navigate to This PC.
- Locate your system drive, by default it should be a C drive.
- Right-click it and choose Properties.
- 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.
3. Make Disk Cleanup remove all temporary files
- Press Windows Key + R and enter regedit.
- Press Enter or click OK.
- 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.
- Set Export range as All and enter the desired file name. Choose a safe location and click on Save.
- In the left pane navigate to
- In the right pane, double click on LastAccess DWORD.
- Set the Value data to 0 or to any other value less than 7.
- 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.
4. Automate Disk Cleanup
- Press Windows Key + R and enter cleanmgr /d c: /sageset:1000.
- Click OK or press Enter.
- Check Temporary files and Temporary Internet Files options and click on OK.
- 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.
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.
Editor’s Note: This post was originally published in September 2017 and has been since revamped and updated in September 2020 for freshness, accuracy, and comprehensiveness.