What are temp files?
Temporary files, also called temp or tmp files, are created by programs on your computer to hold data while a permanent file is being written or updated. The data from temporary files is transferred to a permanent file when the task is complete or when the program is closed.
Temp files often have the extension .TMP and are stored in the C:\Users\AppData\Local\Temp folder.
For example, if you’re writing a document, your word-processing app may create a temporary file to track your progress. If the app crashes, your data is recovered from the temp file. The software that created the temp file should also automatically delete temporary files from Windows 11 when they’re no longer needed.
But when automatic removal doesn’t happen, temporary files become unwanted junk files that build up, waste storage space, and eventually cause performance issues. That’s when it’s time to free up disk space by locating and permanently deleting those files from your Windows PC.
You need your computer to work properly, so if you’re wondering about other reasons your PC gets slower over time, it may be because of high CPU usage and the installation of unnecessary apps on your PC. Issues like these deserve just as much attention as temporary files.
How to clean temp files in Windows 10 and 11
You can manually delete temporary files in Windows 10 and 11 in four ways:
Each of these methods will help you identify the folders and locations that store temporary files, so work through each of them, in turn, to clear as many temp files from your computer as possible. We’ll make sure you know which files are safe to remove before you wipe any data.
The instructions for older versions of Windows — such as Windows 7 and 8 — are similar, but may differ slightly.
Clear temp files by using the Temporary Files menu
Both Windows 10 and 11 allow users to quickly identify and clear temp files through the Temporary Files menu. This is one of the quickest methods, and it covers the most common types of temporary files.
Here’s how to clear temp files by using the Temporary Files menu:
-
Open the Windows Start menu and select Settings.
-
Ensure System is selected and choose Storage.
-
Click Temporary Files.
-
Choose the temp file types you want to delete, then click Remove files.
Be careful not to delete the Downloads folder if you’re actively accessing those files.
Every other folder, however, is full of unwanted junk. Unless you recently lost work due to a computer crash and you still need to recover it, it’s usually fine to clear these out — no programs or other installations will be affected.
Storage Sense
Windows 11 and 10 come with a feature called Storage Sense that automatically deletes temporary files. Storage Sense clears most temp files every few days without you having to do anything. From the System Storage screen (as shown in Step 3 above), toggle on Storage Sense.
You can manage Storage Sense settings by clicking its tile. From there, configure the temp file cleanup schedule — you can schedule it to clear temp files daily, weekly, monthly, or only when storage is getting critically low.
Figuring out how to locate unwanted files and delete them can be a hassle, so get an automatic PC cleaner tool to free up disk space in a flash.
Use Disk Cleanup to delete temp files
Disk Cleanup is a built-in Windows utility that deletes temporary files on Windows by scanning your whole drive. It’ll locate your Windows 11 or 10 temp folder, and other temp file storage locations, then clear them out alongside other junk taking up valuable space.
Here’s how to access and run Disk Cleanup on Windows 11:
-
Press the Windows key + S simultaneously. Type “disk cleanup” and press Enter. Click Run as administrator.
-
If prompted, select the drive you want to search for temp files to clean. Click OK.
-
Review the description for each file type and select or deselect them as needed. Click OK.
This screen looks pretty much the same on older versions of Windows. Disk Cleanup finds tmp files in several locations. Here are the types of temp files Disk Cleanup can remove:
-
Temporary setup and program files, and other .TMP files
-
Old CHKDSK files
-
Setup logs
-
Windows Update and Windows upgrade leftover files
-
Temporary internet files and offline webpages
-
System error memory dump files
-
Windows error reporting files
-
Thumbnails and user file history
Although deleting the above file types can help remove useless bloatware, it’s unlikely to free up more than several hundred megabytes at most. For a more thorough cleaning, look to specialized apps like AVG TuneUp that are specially designed to clean your PC from top to bottom to find hidden temp file folders and other junk files.
Try AVG TuneUp now with a free scan to see just how much junk is clogging up your PC.
Delete temporary files using Command Prompt
You can also use Command Prompt to delete the temporary files folder permanently. However, there’s a small chance you might make more trouble for yourself if you delete files permanently and are unable to retrieve them after they’re gone. If you’re unsure, go with the usual deletion method (by right-clicking a file in File Explorer or on your desktop).
Here’s how to delete temporary files through Command Prompt:
-
Press the Windows key + S simultaneously. Type “cmd” or “command prompt” and select Run as administrator.
-
Type or paste the command del /q/f/s %TEMP%\ into the dialogue and press Enter.
If you see messages stating, “Cannot delete because used by another process,” reboot in Safe Mode to take care of those. Refer to our guidance on how to remove temporary files that you otherwise can’t delete.
Wondering what is %temp% in Windows, anyway? It’s a folder that saves images and other pieces of a website so they don’t have to be downloaded again every time you revisit a site. Other apps put data there for easy access, too.
%temp% is designed to be deleted, but there are some circumstances where you wouldn’t want to delete it. Good antivirus software usually does the trick of deleting %temp% in Windows without the risk, so deleting with Command Prompt shouldn’t be the first thing you try.
Delete temp files in Windows by cleaning up your browser
Browsers leave behind a lot of temporary files and other data, such as cached websites, cookies, and your browsing history. These temp folders can grow to ungodly sizes if not managed, so deleting temporary files on Windows 10 and 11 is an essential part of computer maintenance.
Make sure you know how to delete browsing data in Google Chrome for Windows 10 and 11. Or, use a browser cleaner tool to delete temporary files collected in the most popular browsers.
Common types of browsing data that you can delete include:
-
Cache: Your browser caches, or stores, data from websites you visit so it can load these websites more quickly next time. But if your cache gets too big, it can slow your browser down or make it crash altogether.
-
Cookies: Websites use cookies to remember things about you. Some cookies are helpful, but many websites use third-party cookies to track you around the internet and collect your data. Online advertisers use cookies to serve you “personalized” ads. Delete cookies to free up space and protect your data.
-
History: Your browsing history is a record of every site you visit, while your search history contains everything you’ve searched for. Clear your browsing and search history to keep your online activity private when letting others use your computer.
-
Saved passwords: You can store passwords in your browser to autofill them in the future, but it’s usually more secure to use a password manager instead.
If you use multiple browsers, you’ll need to repeat this process in each of them. Save time with AVG TuneUp — in addition to clearing out temporary files created by Windows and other programs, it’ll also help clean up your browsing data in every browser on your device. Try it free today.
FAQs
Why should I delete temporary files?
You should regularly delete temporary files to free up space, speed up your computer, and reduce performance issues. Insufficient space makes programs run slowly, increases load times, risks 100% disk usage, and can trigger an endless series of error messages and alerts.
For example, when your computer is low on RAM (random access memory), Windows creates a “paging file” on your drive that works as additional RAM. But if your hard drive doesn’t have enough space, Windows can’t create more — and your computer’s performance will suffer until you free up space or upgrade your RAM.
Excessive clutter also causes bugs and crashes. When Windows and the apps on your PC run out of space to create their files, they’ll stop working. Combine this with malware and you could find your computer overheating or your laptop freezing.
Is it safe to delete temp files?
Yes, it’s safe to delete temporary files from Windows. Most of the time, they’ll be deleted automatically — if they’re not, you can delete them yourself from AppData\Local\Temp without many worries. If you’re ever unsure about deleting a file in Windows, search for the temp file name online to find out more.
Does deleting temporary files delete everything?
No, deleting temporary files only deletes unwanted files and the temp files folder rarely contains anything important. There are some exceptions, like if your computer crashed while you were in the middle of work and you forgot to save what you were working on. In that case, the backup data can usually be extracted from the temp folder.
How do I remove temporary files that won't delete?
If you’re having trouble deleting temp files, restart the computer and try again before opening any programs. If that doesn’t work, boot your PC into Safe Mode, which loads only the essential Windows processes. Once you reboot in Safe Mode, you can remove temporary files using Command Prompt.
Where are temporary files stored?
Temporary files are stored in C:\Users\AppData\Local\Temp — but there are also other unneeded leftover files in other parts of your computer. Those are best cleared out with good PC maintenance software like AVG TuneUp.
Clean up temporary files on your Windows PC with AVG TuneUp
By automatically finding every bit of space-hogging junk on your PC — including temporary files — AVG TuneUp helps keep your computer free of unwanted bloat. AVG TuneUp is an automated, hands-off maintenance tool that regularly removes temporary files, bloatware, browser data, and anything else that doesn’t need to be on your machine.