FacebookTwitterLinkedIn

How to Delete Temporary Files on Windows 10

How to Remove Temp Files on Windows 10

Temporary files (also known as temp or foo files) are created to temporarily hold data while a particular file is being used, processed, or created. Temporary files tend to accumulate but, sometimes, you may be unable to delete them. This article features several step-by-step methods to delete temporary files.

how to delete temporary files

These files become junk files once a task is completed and then get deleted. However, some of them do not get deleted and take up your hard drive space.

One of the easiest ways to delete these temporary files is to go to Settings -> System -> Storage, select the Hard Drive hosting the Windows operating system, and click the "Delete temporary files" button. Unfortunately, doing this doesn't always work. The good news is that there are other ways to remove temporary files from your Windows operating system.

In this guide, we will show you how to delete temporary files using Disk Cleanup, third-party software, how to delete temporary files manually from their folders, and some other solutions.

Video Showing How to Delete Temporary Files:

Table of Contents:

Delete Temporary Files Manually

One way to delete temporary files from your computer is to visit the directories where these files are stored, select them, and delete all of them.

Type "%temp%" in Search and click the %temp% result. You will be directed to the Temp folder, where all temporary files and folders are stored.

delete temporary files manually step 1

Select all files and click the "Delete" button, or right-click the selected files and click the "Delete" in the contextual menu.

delete temporary files manually step 2

Now press Windows key + R, and in opened Run dialog box, type the "temp" command and press Enter or click "OK".

delete temporary files manually step 3

Select all files and click the "Delete" button again or right-click the selected files and click the "Delete" in the contextual menu.

delete temporary files manually step 4

Now open the Run dialog box again and type the "prefetch" command. Press Enter or click "OK". If you get the warning message saying that you do not currently have permission to access this folder, click "Continue".

delete temporary files manually step 5

Select all files and click the "Delete" button again or right-click the selected files and click the "Delete" in the contextual menu.

NOTE: if you empty the folder, Windows and your programs may take longer to open the next time you turn on your computer.

delete temporary files manually step 6

[Back to Table of Contents]

Use Disk Cleanup Tool

Another easy way to delete temporary files and folders from Windows is to use Disk Cleanup. Disk Cleanup is used to reduce the number of unnecessary files on drives, which can help the PC to run faster. It can delete temporary and system file.

To run Disk Cleanup, type "disk cleanup" in Search and click the "Disk Cleanup" result.

use disk cleanup tool step 1

Choose the files you want to delete (this tool also displays the amount of space you can free up by deleting certain files and folders) and click "Clean up system files".

use disk cleanup tool step 2

Disk Cleanup will restart, select the files you want to delete again, and click "OK".

use disk cleanup tool step 3

[Back to Table of Contents]

Use Command Prompt

Command Prompt is the input field in a text-based user interface screen, a command-line interpreter application. It is used to execute entered commands. To use Command Prompt, you must enter a valid command along with any optional parameters. Then it executes the command as entered and performs whatever task or function it's designed to perform in Windows.

To launch elevated Command Prompt (to run it as administrator) type "command prompt" in Search and right-click the "Command Prompt" result, select the "Run as administrator" option from the contextual menu.

use command prompt step 1

Now type the del "/q/f/s %TEMP%\*" command (without quotation marks) and press Enter.

use command prompt step 2

[Back to Table of Contents]

Use CCleaner

CCleaner is a small, effective utility for computers running Microsoft Windows. It cleans junk and issues that accumulate over time: temporary files, broken shortcuts, and other problems.

CCleaner can clean redundant files from various programs, remove unneeded entries in Windows Registry, help uninstall software, and select which programs start with Windows. You can download CCleaner from here.

When downloaded, install CCleaner and open it. Select the "Cleaner" option on the left pane and then tick the "Empty Recycle Bin", "Temporary Files", "Memory dumps", "Chkdsk File Fragments", "Windows Log Files" checkboxes under "Windows" section. Uncheck all of the other checkboxes if you do not want CCleaner to clean that data for you.

Click "Analyze", and it will scan for the selected files and data. Then click "Run Cleaner", and it will remove selected files from your computer.

use cleaner

[Back to Table of Contents]

Remove SoftwareDistribution Folder's Contents

Software Distribution folder is a temporary folder in which Windows stores the update files until they are completely downloaded. If you have updated your Windows completely or there is no ongoing updating process, you can delete those stored files (if there are any) and save up disk space.

You can find this folder by following this path: "C:\Windows\SoftwareDistribution\Download". Select all of the contents, right-click them and select "Delete" from the contextual menu.

remove softwaredistribution folder contents

That's it, we hope this guide was helpful, and you can delete all the temporary files stored on your computer without any problems. If there is another way you are aware of and it is not mentioned in our guide - do not hesitate to share it with us and others by leaving a comment in our comment section below.

[Back to Top]

▼ Show Discussion

About the author:

Rimvydas Iliavicius

Rimvydas is a researcher with over four years of experience in the cybersecurity industry. He attended Kaunas University of Technology and graduated with a Master's degree in Translation and Localization of Technical texts. His interests in computers and technology led him to become a versatile author in the IT industry. At PCrisk, he's responsible for writing in-depth how-to articles for Microsoft Windows. Contact Rimvydas Iliavicius.

Our guides are free. However, if you want to support us you can send us a donation.

About PCrisk

PCrisk is a cyber security portal, informing Internet users about the latest digital threats. Our content is provided by security experts and professional malware researchers. Read more about us.

Malware activity

Global malware activity level today:

Medium threat activity

Increased attack rate of infections detected within the last 24 hours.