×
注意!页面内容来自https://recoverit.wondershare.com/erase-data/how-to-delete-temporary-files-in-windows.html,本站不储存任何内容,为了更好的阅读体验进行在线解析,若有广告出现,请及时反馈。若您觉得侵犯了您的利益,请通知我们进行删除,然后访问 原网页
Apr 092026 • Filed to: Recover Files • Proven solutions
Deleting temporary files from your device will usually not affect your device. These files usually hold tiny miscellaneous configurations or settings that have most likely been used by the software that created them in the first place. Temporary files may not be deleted immediately after use by the software that created them thereby leading to heavy junk. Clearing these files is usually the best option.

In this article
Just in case you wonder what all this is. Just as the name suggeststemporary filesalso known as temp files are files that are frequently accessedread and edited or overwritten.
These files are created by the software or applications you have installed on your device. Temp files hold tiny info such as quick settings or very large caches used by the software which created it.
Temporary files on Windows are mainly stored in the Temp foldertypically located at C:\Windows\Temp or within your user profile at USERPROFILE\AppData\Local\Temp. On older systems like Windows XPyou’ll find them in USERPROFILE\Local Settings\Temp.
To quickly access these folderspress Windows + R to open the Run dialogthen type \temp\ and hit Enter. This shortcut instantly takes you to your main temporary files locationmaking cleanup fast and easy.
Knowing where your temp files are stored helps you keep your PC clutter-free and running smoothly.
The volume temporal files occupy may range from a few megabytes to many gigabytes... Say over a hundred gigabytes. When temp files become too largethey clog your computer's memory. This decreases your computer's performance and eats up your device’s memory. You'll gradually run low on disc space. To prevent all these from happeningyou'll need to clear your temporary or temp files once in a while.
One way to do this is by navigating to (on Windows Vista7and 8) \USERPROFILE\AppData\Local\ or (on Windows XP or earlier versions) \USERPROFILE\Local Settings\ and select all or the specific application's temp files you want to clear and deleting them. Howeverthere's an easier way to do this. Simply follow the procedures below to find the temp folder and delete its contents on your Windows machine.
Step 1: Launch the Run program.
On your keyboardhit the Windows button + R key. A program such as the one that appears below in the picture will appear. Nextfollow the procedure in the next step.

Step 2: Automatically find the temp folder.
To automatically open the temp folder type in \temp\ as shown in the image above and your temporal files folder will be opened.
Step 3: Delete Temporary Files.
Here you'll find all applications on your device that uses temporary files.
You have two options:
To delete temporary files selectivelysimply delete the folder. Most applications store their temporal files in folders named after the application. Alternativelyyou can double-click on the folder to open it and delete the files you find in it.
To do thissimply highlight all folders and delete or use the shortcut keys: on your keyboardhit Ctrl + A to select all folders then click hit on the backspace key to delete all or right-click on any of the selected filesscroll to delete and confirm your action.

NOTE: In case of an error saying some files weren't foundsimply check or tick the "do this for all current items" option below the dialog and hit skip.

That's it! If your files were successfully deletedcongratulations on your lightheaded computer!
You could clear your computer's temp files from the command line in two ways. You could do it directly from the cmd program or saving the command in a .bat format and running it. The good thing about using a batch file (.bat) is that you could always just click on it to clean your device based on the command you saved in it. Method 2 below explains this. Read on to see the commands used to delete files.
Firstyou need to open the cmd program by:
After performing the above proceduresa search result containing "cmd" or "command prompt" should be displayed. Click on any of the programs to launch the Windows command prompt.
Nextinto the command prompt windowtype the command:
rd \temp\ /s /q
Note that all the temp files directory will be deleted by doing this. To proceedhit the enter key.
Alternativelyto be more specific with the program folders you want to clearuse this command:
rd C:\Path\to\tmp\folder /s /q
Replace "Path\to\tmp\folder" with the real path to the temp folder you want to clear.
This method is easier and more convenient. It is also reusable and faster.
Step 1: Open your notepad or any other text editor.
Step 2: Type in any of the commands explained in Method 1.
Step 3: Save your text file in a .bat extension instead of .txt extension.
Step 4: Run double click on the file to launch your newly created program.
When next you want to Clear temp filessimply double-click on the batch file to repeat the automated process.
While temp files may be stored in well-known general folderssome applications store their temp files in stranger folderssuch applications make finding all temp files extremely difficult. In such a situationsimply use the Windows Disk Cleanup tool to handle hidden temporary files.
The Windows Disk Cleanup Utility is a tool that can be found on all Windows versions. It is very useful in cases where applications store their temp files in directories or folders other than the well-known temp folders. This tool finds and clears hidden temp files.
To open the Windows Disk Cleanup Tool on Windows 7 please follow the procedures below.
Using Command Prompt:
To use the command prompt to open the Disk Cleanup Utility (the easy way)run the command prompt by clicking the windows icon and searching the keyword "cmd".
To open Disk Cleanup using the Command Prompt program on a Windows 7:
After opening the Command Prompt
The long way:
Look for Disk Cleanup in System Tools.
The temp files cleaning process:
By nowyou should have successfully opened the Disk Cleanup Utility. Follow the simple process below to clean up:

Furthermoreto clear system files that are no longer needed by Windowsclick on the "Clean up system files". If prompted by the UAC or User Account Control to confirm your actionsimply click on the "Delete Files" option.
Tips:
To open and use the Windows Disk Cleanup Tool on your Windows 10 deviceplease follow the procedures below:
From the list of drives on your deviceselect the drive you want to clean or run Disk Cleanup on
To remove temp files from your Windows 10 running a version equivalent to or later than version 1903please follow the procedures outlined below:

That's it! Space consuming temporary files have been cleared.
Most temporary Files are known to end with a .tmp extension.
One can search for every file that ends with .tmp.
Windows Vista and higher versions support the AQS - Advanced Query Syntax. This functionality allows you to search for all files based on their extensions. This functionality could be very helpful when you're trying to find temporary files on your system.
Learn how to use the Advanced Query Syntax on Windows below:
Use the syntax:
ext:
To find .tmp filessimply open the windows search and type in ext:.tmp and search. After doing thata list of all temporary files with the extension .tmp will be displayed and at your mercy.
Tip:
Ever wondered how deleted files can be recovered after they have been deleted even from your recycle bin? Wellthis is because deleting files doesn't actually make the files gosometimes copies of them are made deep in file partitions. Permanently deleting temp files may just be the option for you. Stellar Biteraser is a software capable of permanently deleting files.
17 Internationally recognized erasure algorithms are provided by Stellar Biteraser. These algorithms permanently erase data stored in directories and also prevent the misuse of your private data thereby protecting your privacy. Learn how to use this software on windows based laptops or desktops – Oh! Before thatdid you know you can schedule temp file deleting tasks with Stellar Biteraser?
With Stellar Biteraseryou can make the deletion of useless files automatic. Parameters include (but not limited to) daily scheduleweekly or monthly schedule. How cool is that?
Please follow the steps outlined below to delete windows temporary files using Bitraser.
Step 1: Download BitRaser software.
If you don't already have this softwareyou'll need to download and install it before proceeding.
Step 2: Launch the software.
After successfully installing the softwarelaunch it. You should have a screen like an image below.
Step 3: Navigate to the tools tab.
Check the list of tabs atop your screenclick on the "Tools" option.
Step 4: Nextfind and Click the "Erasure Algorithm" from the Tools tab.
Step 5: Select any of the 17 algorithms provided in the drop-down menu and click the Home tab.
Step 6: Hit erase now and browse the location of the temp files. Refer to Part 2 of this article if you do not know where the majority of your temporary files are stored. Alsowith BitRaseryou can search for files —even hidden files.
Step 7: After selecting the folder from Step 5 abovetick the specific temp files or folders from the list now displayed on your screen.
Step 8: Hit the "Eraser Now" button.
After the process is completeyou may be prompted to reboot your system. Allow the reboot by clicking "Yes".
That's it! Your computer will be restarted free of space-consuming junk files.
Applications on your device may use temporary files to function speedily but many of the apps forget to clear these temp files as soon as they are done —which leads to huge disk space consumption. This post has covered numerous ways you could easily get rid of these files.
Amy Dennis
staff Editor