What is the “Temp” Folder and is it Safe to Delete it?



RECOMMENDED: Click here to fix Windows errors and optimize system performance

A very simple way to free up disk space in Windows is to delete temporary files, sometimes called temporary files. Temporary files are exactly what they look like: Files that your operating system only needs temporarily during use, but now take up little space.

Most temporary files are stored in the Windows Temp folder, whose location varies from one computer to another and even from one user to another. See the steps below for more information.

Manual deletion of the Temp folder on Windows usually takes less than a minute, but may take longer depending on the size of the temporary file collection.



August 2020 Update:

We now recommend using this tool for your error. Additionally, this tool fixes common computer errors, protects you against file loss, malware, hardware failures and optimizes your PC for maximum performance. You can fix your PC problems quickly and prevent others from happening with this software:

  • Step 1 : Download PC Repair & Optimizer Tool (Windows 10, 8, 7, XP, Vista – Microsoft Gold Certified).
  • Step 2 : Click “Start Scan” to find Windows registry issues that could be causing PC problems.
  • Step 3 : Click “Repair All” to fix all issues.

download



Is it safe to delete it?

In general, it is possible to delete everything in the Temp folder. Sometimes you get the message “Unable to delete because the file is in use”, but you can simply skip these files.

For security reasons, delete your temporary directory shortly after your computer restarts. Sometimes, an installer will put something in the temporary directory it needs after a restart to complete the installation. If you restart and wait a little while for everything to calm down, everything that remains in the Temp folder should be able to be deleted.

If you want to be conservative, use the integrated disk cleaning tool (type Disk Cleanup in the search box). If you select “Temporary Files” as one of the items to clean (delete), only files that have not been modified within the last 7 days will be deleted by default.

Besides the fact that it is done automatically on reboot (which would interfere with installations like the one I described), it is always safe to delete the contents of the temporary folder. Since it is safe to delete all temporary files that are not opened and used by an application, and since Windows does not allow you to delete open files, it is safe to delete them at any time (try it). If you cannot delete them because they are open, they will either be deleted automatically when the application that uses them closes, or you will have them the next time you delete them manually.

Some people may suggest that you restart before deleting something, but this is not necessary for the reason described above (on the other hand, it doesn’t hurt to do so).

To clean the temporary folder under Windows:

Create a batch file to automatically clean the Temp folder

You can save a lot of space on your hard disk by deleting the temporary file. And if you shut down your PC every night, you can safely delete the temporary files from the day before when you started.

Open the Notepad and enter the following:

rd %temp% /s /q

md %temp%

Now save the file exactly as the path given below:

%appdata%\microsoft\windows\start menu\programs\startup\cleantemp.bat

This will create your batch file and save it in the Startup folder.

After creating the batch file, I restarted my PC and opened the Temp folder, you can see that there are far fewer files than in the image above.

https://social.technet.microsoft.com/Forums/ie/en-US/4a8eeaa3-0322-4bff-9561-673dbd3731cf/is-it-safe-to-delete-cwindowstemp-files?forum=w7itprogeneral



RECOMMENDED: Click here to troubleshoot Windows errors and optimize system performance