Where Windows 10 stores temporary files and why they pile up
Windows 10 creates temporary files constantly — when you install software, open documents, browse the web, or run updates. These files are supposed to be cleaned up automatically, but they often aren't. Over time they can consume several gigabytes of disk space, slow down your computer, and make it harder to find the files you actually need.
Temporary files live in a few standard locations. The main folder is C:\Users\[YourUsername]\AppData\Local\Temp, which Windows and programs use for short-term storage. A second location is C:\Windows\Temp, which holds system-level temporary files. Your web browser also keeps temporary files in its cache folder. Most of these files are safe to delete — they're meant to be temporary — but a small number might be in use by a running program.
The safest approach is to delete temp files when no other programs are open, and to use Windows' built-in tools rather than manually selecting files. This reduces the risk of deleting something a program needs right now.
Key Takeaways
- Windows 10 stores temporary files in C:\Users\[YourUsername]\AppData\Local\Temp and C:\Windows\Temp, and these folders often contain gigabytes of old files you can safely remove.
- The Disk Cleanup tool (built into Windows 10) is the safest way to delete temp files because it knows which ones are actually safe to remove.
- Storage Sense, found in Windows 10 Settings, can delete temp files automatically on a schedule you choose.
- If you manually delete files from the Temp folder and encounter an error saying a file is in use, close all open programs and try again.
- Deleting temp files does not affect your documents, photos, or installed programs — only temporary working files are removed.
Using Disk Cleanup to remove temporary files safely
Disk Cleanup is Windows 10's built-in tool for removing temporary files, and it's the method most people should use. It identifies which temp files are actually safe to delete and won't touch anything you need.
To open Disk Cleanup, press the Windows key and type "Disk Cleanup", then click the result. A window will open asking you to select a drive — choose C: (or whichever drive holds Windows). The tool will scan for temporary files and show you a list of categories you can delete.
Look for these categories: Temporary files, Temporary Internet Files, Recycle Bin, and Windows Update Cleanup. Check the boxes next to the ones you want to remove. If you're not sure about a category, leave it unchecked — you can always run Disk Cleanup again later. Click OK and confirm that you want to delete the files. The process usually takes a few minutes.
Setting up automatic cleanup with Storage Sense
Storage Sense is a Windows 10 feature that deletes temporary files on a schedule, so you don't have to remember to do it manually. Once you turn it on, it runs in the background and keeps your temp folders from growing too large.
Open Settings by pressing the Windows key and typing "Settings", then click the app. Go to System (on the left side), then Storage. You'll see a toggle for Storage Sense — turn it on. Below that, click Configure Storage Sense or run it now.
You'll see options for how often Storage Sense runs. The default is monthly, but you can change it to weekly or daily if you want more frequent cleanup. Storage Sense will also delete files from your Recycle Bin after a certain number of days — the default is 30 days. You can adjust this too. Once you've set your preferences, Storage Sense will run automatically on the schedule you chose.
Manually deleting files from the Temp folder
If you prefer to delete temp files manually, you can open the Temp folder directly and remove files yourself. This gives you more control over what gets deleted, but it's riskier because you might accidentally delete a file that a running program needs.
Press the Windows key and R together to open the Run dialog. Type %temp% and press Enter. This opens your user Temp folder (C:\Users\[YourUsername]\AppData\Local\Temp). You'll see hundreds of files and folders with names like "tmp" followed by numbers. Select all of them by pressing Ctrl+A, then press Delete. Windows will ask you to confirm — click Yes.
If you get an error message saying a file is "in use" or "cannot be deleted", it means a running program is using that file right now. Close all open programs and try again. You can also restart your computer and delete the files before opening any programs — this guarantees nothing will be in use.
For system-level temp files in C:\Windows\Temp, the process is the same, but you may need administrator permission. If you get a permission error, right-click the file and choose Delete again, then click Continue when prompted.
Clearing your web browser's temporary files
Your web browser stores temporary files (called cache) to load websites faster next time you visit them. Over time this cache can grow large, and clearing it can free up space and sometimes fix loading problems.
In Microsoft Edge, press Ctrl+Shift+Delete to open the clear browsing data window. Check the boxes for Cookies and other site data and Cached images and files. Set the time range to All time if you want to clear everything, or choose a shorter period. Click Clear now.
In Google Chrome, press Ctrl+Shift+Delete. Check Cookies and other site data and Cached images and files, set the time range to All time, and click Clear data.
In Firefox, press Ctrl+Shift+Delete. Check Cookies and Site Data and Cache, set the time range to Everything, and click Clear Now.
What happens if you delete a file that's in use
If you delete a temporary file while a program is using it, the program may behave unexpectedly — it might freeze, crash, or show an error message. However, this won't damage your computer or your other files. The program will straightforward stop working until you restart it.
If this happens, restart your computer. When Windows starts up, it will reload the program and create new temporary files as needed. The program will work normally again. This is why using Disk Cleanup is safer than manual deletion — Disk Cleanup checks which files are actually safe to remove before it deletes anything.
If you regularly get errors when deleting temp files manually, switch to using Disk Cleanup or Storage Sense instead. Both tools are designed to avoid this problem.
How much space you'll free up
The amount of space temporary files take up varies widely depending on how long you've been using your computer and what you do with it. A computer that's been running for a year or more might have 2 to 5 gigabytes of temp files. A newer computer or one that's been cleaned recently might have only a few hundred megabytes.
If your hard drive is nearly full, deleting temp files can make a real difference. If you have plenty of free space, the cleanup is more about maintenance than necessity. Either way, it's a safe operation that won't affect your documents, photos, or installed programs.
Frequently Asked Questions
Will deleting temp files slow down my computer?
No. Deleting temp files frees up disk space, which can actually make your computer faster if your drive was nearly full. The temporary files themselves don't affect performance — they're just taking up space.
Can I delete files while Windows is running?
Yes, but it's safer to close all programs first. If a program is using a temp file, Windows won't let you delete it and will show an error instead. Restarting your computer before deletion guarantees nothing is in use.
What's the difference between Disk Cleanup and Storage Sense?
Disk Cleanup is a one-time tool you run manually whenever you want. Storage Sense runs automatically on a schedule. Both are safe — use Disk Cleanup if you prefer to control when cleanup happens, or use Storage Sense if you want it to happen automatically.
Is it safe to delete everything in the Temp folder?
Usually yes, but there's a small risk that a running program is using one of those files. Disk Cleanup is safer because it checks first. If you delete manually and get an error, just close all programs and try again.
Do I need to delete temp files regularly?
Not if you have plenty of free disk space. If your drive is getting full or your computer is slowing down, cleaning up temp files can help. Running Disk Cleanup once a month or using Storage Sense on a monthly schedule is a reasonable maintenance routine.