Temporary files and app caches are the part of a cleanup that is usually safe to remove, as long as the app that uses them is closed and you stay inside the cache. A cache holds copies that an app can download or build again. A temporary file is scratch space that should have been deleted already. What is not safe to remove is anything next to them: sign-in sessions, cookies, settings, databases and files that are open right now.
Temp file, cache and app data are different things
People use these words interchangeably, which is how cleanups go wrong. They mean different things.
| Kind | Example | What happens if you delete it |
|---|---|---|
| Temporary file | Leftovers from an installer or an unzipped archive | Nothing, unless an app is still using it |
| Cache | Images and scripts a browser saved for faster loading | The app rebuilds it. The next use may be slower or use data |
| Session and site data | Cookies, local storage, saved sign-ins | You are signed out and some settings reset |
| App data | Databases, drafts, settings, offline copies | Real loss. Not a cache. |
Where Windows temp files live
For your account, the temp folder is the one set by the TEMP and TMP variables, usually inside AppData\Local\Temp in your user folder. Microsoft's documentation for GetTempPath says apps look for the TMP variable first, then TEMP, then USERPROFILE, then the Windows directory (checked in October 2026). To open it, press Windows key + R, type %temp% and press Enter.
Windows also has a system temp folder inside C:\Windows. Leave that one to Windows' own tools below.
The simplest safe method: let Windows do it
Go to Settings, System, Storage, then Temporary files. Windows lists categories with sizes. Read each one and untick anything you do not understand, including any category that points to a folder you use for work. Windows 11's Cleanup recommendations shows the same kind of list under Temporary files.
You can also turn on Storage Sense. Microsoft's Storage Sense page says it removes unnecessary temporary files and Recycle Bin items, runs when you are low on disk space when left at its defaults, and does not touch Downloads or cloud content unless you tell it to. The classic Disk Cleanup tool is still included, and its cleanmgr documentation lists Windows 10 and 11 among the supported versions.
Cleaning %temp% by hand
If you want to look first, do it carefully.
- Save your work and close apps, especially browsers, mail, installers and anything that unpacks files.
- Open
%temp%and switch to Details view. Sort by Date modified. - Select only files and folders that are several days old. Recent items belong to something that is probably still running.
- Press Delete. If Windows says a file is in use, choose the option to skip it. Do not try to force it.
- Never delete the Temp folder itself, only its contents.
The age rule is a habit worth keeping. A file that has not changed for days is much less likely to be needed than one touched minutes ago. A restart before you start often releases files that were held open.
Browser cache is not the same as cookies
Browsers separate the two, and so should you. Microsoft's page on viewing and deleting browser history in Edge describes Cached images and files as copies of pages, images and other media that the browser uses to load content faster next time. It describes Cookies and other site data as information websites store to remember your preferences, such as sign-in info.
So to free space without being signed out of everything, open the clear-data dialog with Ctrl + Shift + Delete, choose a time range, and tick only the cache option. Chrome and Firefox use the same shortcut and offer the same split, but wording differs, so read their dialog or help page. Leave passwords, autofill and history unticked unless you mean to clear them.
The cost of clearing a cache is small. Sites may load a little slower on the first visit, and may use more data while the cache fills again.
Messaging apps, games and other programs
Chat apps, game launchers and creative tools keep caches too, usually under AppData\Local or AppData\Roaming in your user folder. Use the app's own clear-cache option when it has one, because the app knows which folders are disposable.
Deleting folders by hand is where trouble starts. Some apps keep sign-in sessions and settings in the same folder tree as their cache, and removing the whole folder can sign you out or reset the app. If you must clear a folder yourself, close the app completely first, including its tray icon, delete only the folder that is clearly named as a cache, and leave everything else.
Developer caches
Package managers keep downloaded packages so they do not fetch them again. Each has a command for clearing its own cache, which is safer than deleting folders:
- npm:
npm cache clean --force, described in the npm documentation - NuGet:
dotnet nuget locals all --clear, from the dotnet nuget locals documentation - pip:
pip cache purge, from the pip documentation
The price is time and bandwidth, because projects re-download what they need the next time they build. Do not clear a cache in the middle of a build or an offline trip.
Microsoft Store cache
If the Microsoft Store itself misbehaves or your Temp folder is filling with app installer files, Microsoft's drive space guide recommends clearing the Store cache by running wsreset.exe from the Run box. A blank Command Prompt window opens and, after about ten seconds, closes and opens the Store.
What to leave alone
- Anything in a folder that an open app uses. Close the app first, or skip the item.
- Crash dumps and error reports while you are still troubleshooting a problem. They may be what a support person asks for.
- The Windows Update download folder,
C:\Windows\SoftwareDistribution. Windows manages it. Use Storage settings or Disk Cleanup instead of removing files by hand. - The WinSxS folder. See our system files guide.
- Your Documents, Pictures, Videos, Music, Desktop and Downloads folders. They are not caches, whatever they contain.
Three rules that cover most cases
- Old: it has not changed for several days.
- Idle: the app that owns it is closed.
- Leaf: it is a clearly named cache or temp folder, not its parent.
If something fails one of the three, skip it. If you cannot tell whether it passes, skip it. Skipping costs a little disk space, while a wrong guess can cost an afternoon.
Clean temp files and app caches with SafeClean
SafeClean offers files in your temp folder only when they are older than your age setting (3 days by default, 1 to 30 adjustable). Browser and messaging app caches are offered only when the app is not running and has not been used within that period. Cookies, sessions, local storage, history and credentials are never touched. Thumbnails, shader caches, crash dumps and developer caches stay off unless you turn them on. Everything is listed first, and nothing is removed until you approve.
Get SafeClean on Microsoft Store Features and pricing
Frequently asked questions
Is it safe to delete everything in %temp%?
Mostly, if no apps are running and you skip files that Windows says are in use. Deleting only items that are several days old is safer, because recent ones may belong to something still working.
Will clearing the browser cache log me out?
Clearing cached images and files should not sign you out. Cookies and other site data hold sign-in information, so clear those only if you want to be signed out.
Why does Windows say a temp file is in use?
A program has it open. Close the program, restart the PC, or skip the file.
Will deleting temp files make my PC faster?
Not by itself. It frees space. Microsoft links low free space with slower performance and trouble installing updates, so it helps when the drive is nearly full. Beyond that, expect no change.
Can I delete C:\Windows\Temp?
Leave it to Windows tools such as Storage settings and Disk Cleanup. Deleting by hand there needs administrator rights, and some files may belong to running system services.