Temp and Prefetch Folders in Windows 11 and 10: What Is Safe to Delete and What to Leave Alone

Open folder with a lightning bolt and drifting file cards beside a small bin with a caution triangle
Open folder with a lightning bolt and drifting file cards beside a small bin with a caution triangle

The Prefetch folder in Windows 11 and 10 is safe to leave alone, and the Temp folders are safe to clear only in the right way. Many cleaner guides tell you to empty both to speed up your PC, but they are different folders with different jobs. Temp holds short-lived files that apps no longer need. Prefetch holds small files Windows uses to open programs faster, and deleting them tends to make the next launches slower, not quicker. This article explains each folder, the safest way to clear temporary files, and what to do when Windows says a file is in use.

Last reviewed: November 23, 2026. The Storage settings and Storage Sense statements were compared with Microsoft Support pages. For the Prefetch folder, Microsoft's own pages say little, so that part rests on accepted answers on Microsoft Q&A (one originally posted in the Microsoft Community) and on general Windows behaviour, and is labelled as such. Nothing was run on a real PC for this article.

Quick answer

  • Temp folders: safe to clear when nothing is using the files. The safest route is Settings > System > Storage > Temporary files, or Storage Sense.
  • Prefetch folder: do not bother. It maintains itself and emptying it does not free meaningful space or boost speed.
  • Never delete the whole Windows folder, System32, or other system folders by hand.
  • If a file is in use, skip it. Windows will remove it later.

In this guide

The folders at a glance

FolderWhat it holdsDelete it?
User Temp (%TEMP%)Temporary files made by your apps and installers while you use the PCYes, through Storage settings. By hand, only files not in use.
Windows Temp (C:\Windows\Temp)Temporary files made by Windows and servicesPrefer Storage Sense or Disk Cleanup. Skip anything in use.
Prefetch (C:\Windows\Prefetch)Small trace files Windows uses to open programs fasterNo need. See below.
SoftwareDistributionWindows Update downloadsLeave it to Windows. See Windows Update cleanup.
AppData and ProgramDataApp settings, saves and cachesNot wholesale. See AppData and ProgramData.

Temp folders explained

Temp folders are scratch space. When you install a program, open an attachment or edit a large file, Windows and the app write working files there. Most are meant to be thrown away. Microsoft's own advice for freeing space lists temporary files among the safe things to remove, through the Settings page, and Storage Sense can clear them automatically.

There are two main places:

  • Your own Temp folder. Press the Windows key and R, type %temp% and press Enter to open it. This is your account's scratch space.
  • The Windows Temp folder. It sits inside the Windows folder and is used by the system and services. Windows may ask for administrator permission to delete from it.

A Temp folder can look huge or full of strange names. That is normal. If a Temp folder grows by gigabytes a day, something may be writing very large logs or failing repeatedly, which is a different problem. See why a cleaner keeps finding the same junk and why the C: drive keeps filling up.

Browser caches are a separate category, not part of these folders. Our clear cache guide covers them.

The Prefetch folder explained

The Prefetch folder lives inside the Windows folder and holds small files with the extension .pf. Windows keeps a record of what a program loads when it starts, and uses it to load the same things faster next time. The files are tiny, often a few tens or hundreds of kilobytes each, so deleting them frees almost no space.

An accepted answer on Microsoft Q&A, posted anonymously and migrated from the Microsoft Community, describes the Prefetch folder as self-maintaining. It says there is no need to delete or empty it, and that if you empty it, Windows and your programs will take longer to open the next time you turn on the computer. The same answer calls claims that deleting Prefetch shortens boot time or frees memory myths. A second Microsoft Q&A answer, from an Independent Advisor, says the slowdown from emptying the folder is temporary, because the files are created again as you use your programs. Both are community answers, not Microsoft Support articles, so treat them as strong guidance rather than a formal rule.

Prefetch is not SysMain

SysMain, formerly called Superfetch, is a separate Windows service. Microsoft's troubleshooting page on SuperFetch (SysMain) deals with the service's CPU behaviour, not with the Prefetch folder. Deleting the Prefetch folder does not stop SysMain or change how much memory it uses. If your real worry is memory use, see Windows 11 memory usage high with nothing open instead.

The safest way to clear temporary files

  1. Open Settings > System > Storage. Wait for the list to load.
  2. Select Temporary files. Windows shows categories with sizes. Untick anything you want to keep, such as the Downloads folder if it appears.
  3. Select Remove files. Windows deletes what is safe to remove and skips files that are in use.
  4. Optionally turn on Storage Sense. Microsoft says Storage Sense is off by default, so check that it is on. With default settings it runs when the device is low on disk space and clears unnecessary temporary files. It does not touch your Downloads folder unless you set it to.

You should see the sizes in the Temporary files list drop after Remove files. Any item that was in use will still be listed. That is expected, and it is not a failed clean-up.

On Windows 10 the same page is under Settings > System > Storage, and Disk Cleanup is another built-in route, covered in our computer disk cleanup guide. If Storage Sense does nothing, see Storage Sense not working.

Checking sizes without deleting

Before you clear anything, you can measure. Looking at a folder does not change it, so this is a safe first step.

  1. Open your Temp folder. Press Windows key + R, type %temp% and press Enter.
  2. Go up one level. In the File Explorer address bar, select the folder above Temp.
  3. Right-click the Temp folder and choose Properties. The size can take a moment to calculate on a large folder.
  4. Check the Windows Temp folder the same way. Browse to the Windows folder on C: and look at its Temp folder. Only look. Windows may ask for permission to open it.

Use the numbers to decide what to do next. A size that stays steady is normal. A size that keeps rising from one check to the next points to something writing files again and again, which is a separate problem. It is not a reason to delete more. If the disk stays busy from a background service rather than from files, see SysMain high disk usage.

Clearing the Temp folder by hand

You rarely need to, but if you want to, here is the careful way. This is general Windows behaviour rather than a Microsoft-documented procedure.

  1. Close your browser, mail and other apps, then restart the PC so fewer files are locked.
  2. Press Windows key + R, type %temp% and press Enter.
  3. Press Ctrl + A to select everything, then Delete. If you prefer, sort by Date modified and delete only older items.
  4. When Windows says a file is in use, choose Skip, and tick Do this for all current items if offered. Do not try to force it.
  5. Empty the Recycle Bin if you want the space back.

Do not go further than the Temp folder

Do not delete the Windows folder, System32, WinSxS, or driver folders by hand. They hold files Windows needs to start. See the WinSxS folder explained for why the system folders look large.

When not to clear temporary files

Temp files are usually safe to remove, but a few situations call for waiting.

  • While an installer, update or backup is running. The program may still need the files it wrote.
  • When a program has unsaved work open. Some apps keep recovery copies in temporary space. Save your work first, then clear.
  • When a technician asks you to keep logs. Crash and error files can help diagnose a problem, so keep them until the diagnosis is finished.
  • When you do not know what a folder is. Leave it alone and check with the program's own support.

Cleaners that offer a single clean-everything button ignore these cases. Our PC cleaner safety checklist explains which options to untick before you run one.

If a file is in use or access is denied

Those messages are Windows protecting files that something is still using. The right response is to skip them, not to override them. If many files will not delete after a restart, see temporary files that will not delete. If you ran a cleaner and the same files keep returning, that is usually because they are rebuilt, as explained in why a cleaner finds the same junk every day.

If deletion fails or the folder refills

If the Temp folder keeps filling up

Microsoft's free-up-drive-space page describes one case in which the Temp folder fills with app package files used by Microsoft Store. The page's suggested fix is to reset the Store, clear its cache and run the Windows Update troubleshooter.

  1. Select Start > Settings > System > Troubleshoot > Other troubleshooters, then select Run next to Windows Store Apps.
  2. Press Windows key + R, type wsreset.exe and press Enter. A blank window opens, closes after about ten seconds, and the Store opens.
  3. Run the Windows Update troubleshooter from the same Other troubleshooters list.

If the folder still refills quickly, malware can also write files. See how to remove a virus or malware.

If Storage settings do not free enough

A Microsoft Q&A answer from an Independent Advisor suggests trying Disk Cleanup instead. After you open it, the Clean up system files button shows more deletable options. Read each option before you tick it, and skip anything you do not recognise.

If Windows files look damaged

If the problem is damaged Windows components rather than files in use, the repair route is different. See SFC and DISM repair of Windows system files. Do not delete more from the Windows folder to compensate.

Windows 10 and Windows 11 differences

The steps in this guide work on both versions, but the labels are not identical. Microsoft's free-up-drive-space page gives separate Windows 11 and Windows 10 instructions, so follow the tab that matches your version.

On Windows 11, Microsoft also describes a Cleanup recommendations view under Storage, which suggests files in each category and shows how much space removing them would save. On Windows 10, the Storage page sits under Settings > System > Storage, but the names of some options can differ. If a label in this guide does not match your screen, look for the closest match on the Storage page, and do not guess.

If you run Windows 10 and are weighing a third-party cleaner, read our note on PC cleaners for Windows 10 after end of support before you install one.

Myths worth ignoring

Frequently asked questions

Questions about Prefetch

Is it safe to delete the Prefetch folder?

It is not harmful, but it is pointless. It maintains itself, and emptying it makes the next program launches slower while Windows rebuilds the data.

Does deleting Prefetch free RAM or speed up the PC?

No. The files are tiny, and the memory-related service is SysMain, which is separate.

What are .pf files?

Prefetch trace files that Windows uses to speed up opening programs. They are not ordinary documents.

Why does a cleaner offer to clear Prefetch?

Some cleaners list it as a category. We suggest unticking it. Our guide to how to read scan results explains why.

Questions about Temp files

Is it safe to delete everything in the Temp folder?

It is safe to delete files that are not in use. Skip those Windows reports as in use.

Where is the Temp folder?

Type %temp% into the Run box (Windows key + R) for yours. The system one is inside the Windows folder.

Can I check the size without deleting anything?

Yes. Right-click the Temp folder in File Explorer and choose Properties. Looking does not change the folder.

Why does the Temp folder fill up again?

Apps and installers create new temporary files each time you use them, so the folder refills. A steady, modest amount is normal. Rapid growth is worth checking with the steps under If the Temp folder keeps filling up.

How much space will I get back?

It varies. A PC that has run installers for a long time may free a lot. A tidy one may free almost nothing.

Should I use Storage Sense instead?

Yes, for routine clearing. It can run on a schedule and skips files in use.

How this article was checked

The Storage settings steps and the Storage Sense behaviour were compared with Microsoft Support pages. The Prefetch guidance comes from accepted answers on Microsoft Q&A, not from a Microsoft Support article. The SysMain note was checked against a Microsoft Learn troubleshooting page. The manual Temp steps and the size checks are general Windows behaviour. Menu names can differ between Windows 10 and Windows 11 versions.

More help

For other PC problems, try the Repair Assistant or browse our PC repair guides. To see where the space on your drive really goes, read Windows 11 C drive full.

Sources