The Windows Temp folder is where the vast majority of temporary files are saved; however, the precise placement of this folder varies from computer to computer. Manually removing temporary files from the Temp folder in Windows often takes less than a minute. However, the time required might vary depending on the size of the collection of temporary files. Delete temporary files to clear up space on your hard drive in Windows 10, 8, 7, Vista, or XP. Temporary files are also referred to as temp files in specific contexts.
Guide to Erasing Temporary Files in Windows
To clear the temporary files on your Windows computer, follow these easy steps:
- Windows 10 users should choose the Cortana search box on the taskbar directly to the right of the Start button.
- Windows 8.1 users should right-click or press and hold the Start button, and after that, choose the Run option from the context menu.
- In Windows 8.0, the Apps screen is where you will quickly find the Run command.
- Choose Start to open the search box on older versions of Windows, or look for the Run command in the menu that appears.
- Entering the WIN+R keyboard shortcut is another option for opening the Run dialogue box on your computer.
- In the window labeled "Run" or the search box, type the following command in its entirety:
- This command, which is technically one of the numerous environment variables in Windows, will open the folder that Windows has chosen as your Temp folder.
- Select all of the documents and directories included inside the Temp folder that you want to remove. Choose each one unless you have a specific cause to choose differently.
- When deleting temporary files, if you are given a warning that a File Is Being Used or a Folder Is Being Used, choose the Skip option.
- This screenshot from Windows 10 shows the Skip option available while the clean of temporary files.
- Windows show this message to inform you that the file or folder you are attempting to remove is locked because a program is using it, maybe even Windows itself. When they are skipped, the erasing process may proceed with the data that is still left.
- Wait for the temporary files to be wiped completely, which might take anywhere from a few seconds if you have a few files in this folder to several minutes if you have multiple huge files. Please be patient throughout this process.
- When everything is done, you won't get a notification of any kind. Instead, the progress indicator will vanish, and you'll be presented with a screen that displays the contents of your empty or almost empty temporary folder. You are free to shut this window at any time.
- You will be informed that the data you are deleting will be permanently erased if the amount of data you are removing is so significant that it cannot all be sent to the Recycle Bin simultaneously.
- Find the icon for the Recycle Bin on your desktop, right-click or press and hold it, and then choose the option to empty the Recycle Bin from the context menu.
- Confirming that you wish to delete the things will result in the temporary files being irreversibly removed from your computer.
Utilizing a Command Line
Deleting temporary files is often done in the manner outlined above, which requires human intervention on the user's part. If you would like, you may develop your little program that, when run, will immediately erase these temporary files with the simple action of double-clicking or tapping on a BAT file. You can do this by using the rd (remove directory) command that is included in the Command Prompt to delete the whole folder and all of its subfolders. To create a batch file with the.BAT extension, open Notepad or another text editor of your choice, and then enter the following command:
- The q argument eliminates the need to confirm the deletion of the files and directories by displaying confirmation prompts. At the same time, the s parameter deletes all files and subfolders included inside the temporary folder.
- If the %tmp% environment variable is not functioning for some reason, feel free to replace it with the actual folder location described in Step 2 above.
Just make sure that you input the proper folder path, and to be on the safe side, enclose the path in quotes like this:
Other Types of Temporary Files in Windows
On Windows PCs, temporary files and other groupings of data no longer required are kept in locations in addition to the Windows Temp folder. Other locations include:
Check the Cache in Your Browser
Additionally, your browser stores temporary files. This is often done to speed up your browsing experience by fetching previously visited web pages from its cache whenever possible. To learn how to delete these temporary files, look at the article titled "How to Clear Your Browser's Cache."