Remove Temporary Files in Windows Easily
发布时间:2026-09-23 | 浏览:1
Unlock space and enhance performance by clearing Windows temp files, browser cache, and more
You can delete temporary files on Windows by clearing the "temp" folder using the Run dialog box.
Temporary files take up space, so deleting them can free up disk space on your computer.
Use shortcuts like Shift+Delete for faster file removal or system cleaners for easy deletion.
One way to free up disk space in Windows 11, 10, 8, 7, Vista, and XP is to delete temporary files. These files were only needed temporarily during use by your operating system and now just waste space.
Most temporary files are stored in the Windows Temp folder, the location of which differs from computer to computer. Manually cleaning this out in Windows usually takes less than a minute, but it could take longer depending on how large the collection of temporary files is.
How to Delete Temporary Files in Windows
Follow these simple steps to delete your temporary Windows files:
Open the Run dialog box. In Windows 11, 10, and 8, right-click the Start button and select Run . In earlier versions of Windows, choose Start to bring up the search box or find Run. Another way to open the Run dialog box is to enter the WIN + R keyboard shortcut.
Open the Run dialog box.
In Windows 11, 10, and 8, right-click the Start button and select Run .
In earlier versions of Windows, choose Start to bring up the search box or find Run.
Another way to open the Run dialog box is to enter the WIN + R keyboard shortcut.
In the Run window or search box, enter the following command exactly: %temp% This command, one of many environment variables in Windows, will open the folder designated by Windows as your Temp folder, likely located in your user account's AppData folder : C:\Users\[username]\AppData\Local\Temp .
In the Run window or search box, enter the following command exactly:
This command, one of many environment variables in Windows, will open the folder designated by Windows as your Temp folder, likely located in your user account's AppData folder : C:\Users\[username]\AppData\Local\Temp .
Select all the files and folders within the Temp folder that you want to delete. Unless you have a reason to otherwise, select them all. If you're using a keyboard or mouse, click one item and then use Ctrl+A to select every item within the folder. If you're on a touch-only interface, choose Select all from the Home menu at the top of the folder. You don't need to know the purpose of each temp file you're deleting or the number of files in any subfolders. Windows won't allow you to delete any files or folders that are in use. More on that shortly.
Select all the files and folders within the Temp folder that you want to delete. Unless you have a reason to otherwise, select them all.
If you're using a keyboard or mouse, click one item and then use Ctrl+A to select every item within the folder. If you're on a touch-only interface, choose Select all from the Home menu at the top of the folder.
You don't need to know the purpose of each temp file you're deleting or the number of files in any subfolders. Windows won't allow you to delete any files or folders that are in use. More on that shortly.
Delete all the temporary files and folders you've selected, either using the Delete key on your keyboard or the Delete button from the Home menu. Depending on your version of Windows, and how your computer is configured, you might be asked to confirm that you wish to Delete Multiple Items . You may even have to select Yes on a special Confirm Multiple File Delete window that appears. Handle any messages about hidden files in this folder the same way—it's fine to delete those, too.
Delete all the temporary files and folders you've selected, either using the Delete key on your keyboard or the Delete button from the Home menu.
Depending on your version of Windows, and how your computer is configured, you might be asked to confirm that you wish to Delete Multiple Items . You may even have to select Yes on a special Confirm Multiple File Delete window that appears. Handle any messages about hidden files in this folder the same way—it's fine to delete those, too.
Choose Skip if you're presented with a File In Use or a Folder In Use warning during the temporary file deletion process. This is Windows telling you that the file or folder you're trying to delete is locked and still in use by a program, or maybe even Windows itself. Skipping these allows the deleting to continue with the remaining data. If you're getting a lot of these messages, check the Do this for all current items checkbox and then select Skip again. You'll have to do it once for the file messages and again for the folder ones, but warnings should stop after that. It's rare to encounter a message like Error Deleting File or Folder that stops the temp file deletion process entirely. If it occurs, restart your computer and try again. If that fails, try starting Windows in Safe Mode and repeat the steps above.
Choose Skip if you're presented with a File In Use or a Folder In Use warning during the temporary file deletion process.
This is Windows telling you that the file or folder you're trying to delete is locked and still in use by a program, or maybe even Windows itself. Skipping these allows the deleting to continue with the remaining data.
If you're getting a lot of these messages, check the Do this for all current items checkbox and then select Skip again. You'll have to do it once for the file messages and again for the folder ones, but warnings should stop after that.
It's rare to encounter a message like Error Deleting File or Folder that stops the temp file deletion process entirely. If it occurs, restart your computer and try again. If that fails, try starting Windows in Safe Mode and repeat the steps above.
Wait while all the temp files are deleted, which could take anywhere from a few seconds if you only have a few files in this folder, and up to several minutes if you have many and they're large. You won't be prompted when the process is complete. Instead, the progress indicator will just disappear, and you'll see your empty, or almost empty, temp folder up on the screen. Feel free to close this window. If you happen to be deleting so much data that not all of it can be sent to Recycle Bin, you'll be told that they'll be permanently removed.
Wait while all the temp files are deleted, which could take anywhere from a few seconds if you only have a few files in this folder, and up to several minutes if you have many and they're large.
You won't be prompted when the process is complete. Instead, the progress indicator will just disappear, and you'll see your empty, or almost empty, temp folder up on the screen. Feel free to close this window.
If you happen to be deleting so much data that not all of it can be sent to Recycle Bin, you'll be told that they'll be permanently removed.
Finally, locate Recycle Bin on your Desktop, right-click or tap-and-hold the icon, and then choose Empty Recycle Bin . Can't find Recycle Bin? It might have been hidden. You can still open a hidden Recycle Bin in File Explorer .
Finally, locate Recycle Bin on your Desktop, right-click or tap-and-hold the icon, and then choose Empty Recycle Bin .
Can't find Recycle Bin? It might have been hidden. You can still open a hidden Recycle Bin in File Explorer .
Select Yes on the prompt to confirm that you want to delete the items, which will permanently remove those temporary files from your computer. You now, in the short term, have an empty temporary files section.
Select Yes on the prompt to confirm that you want to delete the items, which will permanently remove those temporary files from your computer. You now, in the short term, have an empty temporary files section.
The next time you delete temporary files in Windows, feel free to hold down Shift as you delete the files. It's a trick that will skip over storing them in Recycle Bin, essentially "permanently" deleting them and saving you this last step.
Using a Command Line Command
The steps above are the usual way to delete temporary files manually. Alternatively, you can create a mini-program to delete these temp files automatically with a simple double-click of a BAT file .
You can do this using the rd (remove directory) Command Prompt command to delete the entire folder and all the subfolders.
Type the following command into Notepad or some other text editor, and save it with the .BAT file extension:
The q parameter suppresses confirmation prompts to delete files and folders, while s is for deleting all subfolders and files in the temp folder.
If the %temp% environment variable isn't working, use the actual folder location mentioned in Step 2 above. Ensure you enter the correct folder path and, for safety, surround it in quotes like this (changing the username accordingly):
Other Types of Temporary Files in Windows
The Windows Temp folder isn't the only place temporary files, and other no-longer-needed groups of files, are stored on Windows computers.
The folder you found in Step 2 above is where you'll find some of the operating-system-created temporary files in Windows, but the C:\Windows\Temp\ folder contains a number of additional files that you no longer need to keep. Feel free to open that Temp folder and delete anything you find in there.
The Settings app in Windows 11 and Windows 10 has an entire section dedicated to deleting temporary files. Get there through Settings > System > Storage > Temporary files . Included there are things like delivery optimization files, Windows upgrade log files, temporary files left over by apps, and more. Choose what to remove, and then select Remove files .
Those same, harder-to-find locations for temporary files are accessible in older versions of Windows, too, like Windows 7, via Disk Cleanup. This utility is included in all versions of Windows and can help remove the contents of some of those other temp folders for you automatically. You can open that in a Run dialog box ( WIN+R ) via the cleanmgr command.
Check Your Browser Cache
Your browser also stores temporary files to speed up browsing by loading cached versions of web pages upon revisits. Refer to our guide on how to clear your browser's cache for assistance with deleting these files. Typically, the shortcut is Ctrl+Shift+Del (Windows) or Command+Shift+Delete (Mac).
Handy Tools for Easy Removal
Dedicated "system cleaners" like the free CCleaner program can make this, and similar jobs, really easy. Many free computer cleaner programs exist to choose from, too, including Wise Disk Cleaner .
Check how much free space your hard drive has , both before and after you delete temporary files, to see how much space you recovered.
Frequently Asked Questions
How do you delete temp internet files? To delete temporary internet files and cookies in Internet Explorer, go to Tools (gear icon) > Internet Options and select Delete under Browsing history. In Firefox, open the menu and go to Options > Preferences > Privacy & Security > Clear History. In Chrome, go to More > More tools > Clear browsing data .
To delete temporary internet files and cookies in Internet Explorer, go to Tools (gear icon) > Internet Options and select Delete under Browsing history. In Firefox, open the menu and go to Options > Preferences > Privacy & Security > Clear History. In Chrome, go to More > More tools > Clear browsing data .
How do you clear temp files on Android? Older versions of Android used to let you clear a device's cache all at once. Now, you need to clear the cache of individual apps. To do that, go to Settings > Apps , select an app, and choose Storage & cache > Clear cache , or Storage > Clear Cache .
Older versions of Android used to let you clear a device's cache all at once. Now, you need to clear the cache of individual apps. To do that, go to Settings > Apps , select an app, and choose Storage & cache > Clear cache , or Storage > Clear Cache .
Where does Excel store temp files? The default location for temporary Excel files in Windows 11 and 10 is C:\Users\AppData\Local\Microsoft\Office\UnsavedFiles . If you're trying to find a deleted or lost Excel workbook, this is the first place you should look. Copy and paste the file into a new location, such as Documents or your Desktop, then open it in Excel.
The default location for temporary Excel files in Windows 11 and 10 is C:\Users\AppData\Local\Microsoft\Office\UnsavedFiles . If you're trying to find a deleted or lost Excel workbook, this is the first place you should look. Copy and paste the file into a new location, such as Documents or your Desktop, then open it in Excel.
Where does Firefox store temp files? Firefox calls temp files the "cache". You can get information about it by typing about:cache in the location bar. Typically, Firefox places temporary cache files in the C:\Users\[username]\AppData\Local\Temp location.
Firefox calls temp files the "cache". You can get information about it by typing about:cache in the location bar. Typically, Firefox places temporary cache files in the C:\Users\[username]\AppData\Local\Temp location.
Software & Apps
Related Articles