DEV Community

Cover image for How and Why you should clear your Microsoft Windows Temp folder
Habdul Hazeez
Habdul Hazeez

Posted on

How and Why you should clear your Microsoft Windows Temp folder


The Windows Temp folder contains files that were used, or currently being used by applications installed or running on your Windows system. When the application exits, these files still remain in this folder, over time, it'll take up a considerable amount of your disk space.

In this tutorial, you'll learn: How to find this folder; How to clean it; and Why you should clean it up.

Let's start.

How to find the Temp folder

The Temp folder is located in a hidden folder called Appdata, you can show this folder by following the steps detailed in a previous article, but I think that's unnecessary. Here is what you will do.

You'll access the folder via the Windows Run dialog box with its shortcut name.

Perform the following steps:

Step 1

Press the Windows Key and R simultaneously, this will bring up the Run dialog box.

Then type: %temp as shown in the image below, then click OK.

Windows Run dialog box with the word %temp%

This will display a window that will list the temporary files currently present on your system. If you've not cleared this folder before, the files could be in the thousands occupying Gigabytes of space.

Mind you, some files will have the .tmp extension as shown in the image below:

Windows Temp folder with file extension highlighted

Select the files and delete them. You should know, some files might be in use by an application, if this is the case, Windows will prompt to tell you the application using the file, and it will stop the deletion unless the application exists

Windows prevents a Temp file from being deleted

Why you should clean the Temp folder

As stated in previous paragraphs, the Temp folder can occupy a large chunk of your hard drive depending on your system usage, in addition, Malware can use this folder to store some of its files as noted in the article by ESET entitled: More evil: A deep look at Evilnum and its toolset published in July 2020.

NOTE: The Windows Key is the key on your keyboard with the Windows logo on it.


Cover photo by Gary Chan on Unsplash.

Top comments (0)