As we open applications and files in Windows 10, a set of elements called temporary files are created which are a group of files linked to the object (app or file) to facilitate that the next access to it loads its data from one much more efficient way, but with the passage of time (months or years), if these files are not cleaned, problems such as:
Problems cleaning files
- Improper use of hard disk space
- Failure to access files or programs (due to changes in these)
Traditionally to delete temporary files in Windows 10 we do it with the command% temp% and later delete the information, but in this tutorial we will learn how to delete these temporary files from CMD..
To stay up to date, remember to subscribe to our YouTube channel! SUBSCRIBE
How to delete temporary files in Windows 10 using CMD
To achieve this, we access CMD as administrators:
Once in the console, we must understand two aspects for the task. This in order to know where in Windows 10 the temporary files should be cleaned.
- To go to the previous folder we execute "cd .."
- To go to the root folder we execute "cd .."
Now we are going to delete the temporary ones using the command:
del * .tmp / s / f / q
The del (delete) command is responsible for deleting the data information based on the defined criteria, in this case we will delete all the temporary files whose extension is .tmp (* .tmp), the parameters used are:
- / s: is responsible for deleting specific files from the current directory and all subdirectories, in addition to that, it displays the names of the files as soon as they are eliminated in the console
- / f: this is a parameter that forces the deletion of read-only files
- / q: this is the you silent mode, that is, it does not ask for the delete confirmation
Besides this it is possible to use extra parameters such as:
- / p: Prompts for confirmation before deleting the specified file in the console
- / a [:] <attributes>: Removes files based on the following file attributes, r (read-only files), h (hidden files), i (non-indexed content files), s (system files), a (files ready to archive), l (reanalysis points)
- / ?: displays help at the command prompt
Executing the command leads to the process of deleting temporary files in Windows 10:
At the end we will see the following:
After this, we access the File Explorer, right-click on the C drive and select Properties:
We will see the following:
We click on "Free up space" and in the pop-up window we select the desired options including "Temporary files":
Apply the changes by clicking OK and we will see the following message:
Click Delete files to confirm the process:
This has been the way to delete temporary files manually in Windows 10.