In this post we will see the ways to delete temporary files in Windows 10 and earlier versions. Deleting these items will allow you to recover space on your hard drive and keep your system clean, organized and in good working order.
Windows constantly generates temporary files that could take up a lot of space, and even cause system instability. But before we show you how to remove these files from your system, we must know what they are used for, how they can affect the performance of the computer and the capacity of the internal hard drive.
What are temporary files?
In Windows, temporary files are created by both the operating system and many of the installed applications. Many are of the .tmp file type or preceded by a tilde (~) and are located in the Temp folder.
The use of these files occurs for a variety of reasons, including:
- Operating system requirements, such as providing space for virtual memory.
- Job files for applications that contain data while the program is running.
- Files created as backups for jobs in progress, etc.
As the name implies, temporary files are intended to temporarily address an issue. When they finish their work, they are eliminated by the process that created them. But this does not always happen as it should, and many of these files remain on your hard drive unnecessarily.
Why delete temporary files?
There are two main reasons for deleting temporary files in Windows 10 or any version of Windows, which are:
- Reclaim Storage Space: Temporary files created by the system and other applications, as they accumulate, can take up a considerable amount of hard disk space.
- Improve computer performance: also these files accumulate in large quantities can negatively affect the performance of your computer.
As a consequence, the system having to search and load this large number of files can make your computer and the applications you are using slower.
Deleting these files can greatly speed up your computer’s performance. For these reasons, you should periodically clean Windows 10 of temporary files that may be affecting your computer.
1. Delete temporary files manually in Windows 10
Find the Temp folders of temporary files:
To delete the temporary files on your computer, you should first know that there are two different Temp folders:
– The main Temp folder is located in C: / Windows / Temp and you can access it by pressing the Windows + R keys to open Run, type temp and press the Enter key .
– The second Temp folder is the one related to the user currently connected to the system, and you can find it as follows for each version of Windows:
In Windows 10, using the search field to the right of the Start button, enter % temp%. The folder at the top of the results is the Temp folder.
In Windows 8, on the Start page, click the magnifying glass icon in the upper-right corner of the window, next to your username. Type % temp% and click on the Temp folder.
In Windows 7, Vista and XP, click the Start button and in the search field type % temp% and click the Temp folder.
Steps to clean these folders:
You can follow this procedure for both folders.
# 1. Select all the files you want to delete, unless there are specific ones that you know you should keep.
# 2. Delete the selected files with the Delete key on your keyboard. If it asks you to confirm the removal of hidden temporary files, click Yes.
# 3. If you get a message that a file or folder is in use, click the Skip button to skip these files, which are blocked by Windows or another application.
# 4. Wait for the process to complete, which may take some time if you are dealing with a large number or large files.
# 5. Empty the Recycle Bin to permanently delete your files and reclaim the space they occupied.
2. Create a bat file to clean the temp folder automatically
You can also delete temporary files automatically using a batch file. In this way they will be safely erased every time you turn on your PC and the system boots.
To create the bat file and clean the Temp folder periodically, follow these steps:
# 1. Open Notepad and type the following:
rd% temp% / s / q
# 2. Now save the file exactly like the following path:
% appdata% \ microsoft \ windows \ start menu \ programs \ startup \ ClearTemp.bat
This will create the batch file and save it inside the Startup folder.
# 3. After creating the bat file, you can now restart your PC and open the Temp folder. Now you can see that there are far fewer files than before.
3. Delete temporary files automatically in Windows 10
Starting with Windows 10 version 1709) there is the Storage Sense option to preserve disk space.
If you enable it, you will be able to delete temporary files and files in the Downloads folder and unchanged Recycle Bin after 30 days.
WARNING: Please note that the system removes all files that have not undergone changes in the last 30 days. You could risk losing important files if you leave them in the Downloads folder or the Recycle Bin.
# 1. Open the Settings application , for which you can use the Windows + i shortcut , and go to System > Storage.
# 2. In the Storage detection section , activate the function by moving the switch to the on position.
# 3. Now click the Configure Storage Sense link or run it now.
# 4. You have different alternatives in the option Run Storage Sensor, but I would leave it in When there is little free space on the disk.
# 5. Activate the option Delete temporary files that my applications do not use.
# 6. Additionally, you can change the period of the options Delete files from the recycle bin and the download folder, or even deactivate them.
In this way you will have cleaned your PC of temporary files. Performing this type of cleaning on a regular basis can help optimize your system and keep your hard drive free of useless files.