Skip to content

Windows has four temp folders and clears about half of them

Where temporary files actually live, which ones Windows removes on its own, and the applications that never clean up after themselves.

5 min read

Windows keeps temporary files in more than one place, and the advice to clear them is usually given without saying which, or what clears itself anyway.

The four places

FolderWho writes to itCleared automatically
%TEMP%, in AppData\LocalApplications you runBy Storage Sense, if enabled
C:\Windows\TempSystem servicesRarely, and it is usually small
%LOCALAPPDATA%\Microsoft\Windows\INetCacheInternet Explorer and system componentsYes
Per app cache foldersEach application's ownAlmost never
echo %TEMP%
# or, in PowerShell
$env:TEMP

What actually clears itself

Storage Sense, in Settings, System, Storage, removes temporary files on a schedule when it is switched on, and it is off by default on many installs. It is the single setting worth changing here, because it turns a recurring chore into something that happens without you.

What it will not touch is the per application caches under AppData that look like temp folders and are not. Those belong to the program that made them and only that program knows when they are finished with.

Clearing them by hand

  1. Close what you can. Files in use cannot be removed and that is correct.
  2. Open Settings, System, Storage, Temporary files and use the list there. It knows which categories are safe.
  3. For the rest, %TEMP% can be emptied in Explorer. Expect a handful of files to refuse, and leave those.
  4. Do not empty C:\Windows\Temp while services are running unless you have a specific reason.

When temp files are the actual problem

A per user temp folder in the tens of gigabytes is not normal and is worth tracing rather than clearing. It is almost always one application: an installer that failed partway, a video tool writing scratch files, or a service retrying a large download. The folder names inside usually name the culprit, and fixing that is worth more than emptying it monthly.

If the folder is modest and the drive is still full, the space is somewhere else entirely, and the seven places it hides covers the order to look in.

Common questions

Where are temp files stored on Windows?

In %TEMP% under AppData\Local for your account, in C:\Windows\Temp for system services, plus per application cache folders that look similar but belong to the programs that made them.

Is it safe to delete temp files on Windows?

Yes, through Settings, System, Storage, Temporary files, which knows which categories are safe. Files that refuse to delete are in use by a running program and should be left.

Does Windows clear temp files automatically?

Only if Storage Sense is switched on, and it is off by default on many installs. Turning it on is the single change that stops this being a recurring chore.

Why is my temp folder tens of gigabytes?

That is not normal and is usually one application: a failed installer, a media tool writing scratch files, or a service retrying a download. The folder names inside generally identify it, and fixing the cause beats clearing it monthly.

Read next