How To Delete Temporary Files on Windows.
Deleting unnecessary temp files of your Windows system is an important task that you should perform at regular intervals. Let's learn how to delete temp files using Disk Cleanup on Windows.
Step 1: Press 'Windows key + S' to open the search box, type 'Disk Cleanup' and select the app from the search result.
Step 2: The Disk Cleanup utility will prompt you to select a drive. Choose the drive you want to clean (usually C:), and click 'OK.'
Step 3: The utility will calculate the space you can free up. In the Disk Cleanup dialog box, check the categories of files you want to delete, such as 'Temporary files' or 'Temporary Internet files.'
Quick Note: 'Temporary Files' refer to a broader category of temporary data created by applications and the operating system, while 'Temporary Internet Files' specifically pertain to temporary files generated by web browsers during internet browsing.
Step 4: Click 'OK' to confirm your selection, then click 'Delete Files' to initiate the cleanup process.
To access more cleanup options, click on 'Clean up system files' in the Disk Cleanup dialog. This allows you to remove system files, including the previous Windows installation if applicable.
How To Delete Temporary Files Using Command Prompt.
You can also delete your Windows temp files from the Command prompt using some basic simple commands. Let's learn how to do this:
Step 1: Press 'Windows + X' to open the Power User menu.
Step 2: Select 'Command Prompt (Admin)' or 'Windows PowerShell (Admin)' to open CMD with administrative privileges.
Step 3: In the Command Prompt window, type the following command and press Enter:
cd %temp%
Optionally, you can view the contents of the Temp folder by typing: dir
Step 4: To delete all files and subdirectories in the Temp folder, type:
del /s /q *
- /s includes files in all subdirectories.
- /q enables quiet mode, which doesn't prompt for confirmation.
Step 5: To navigate to the Prefetch folder, which contains additional temporary files, type:
cd C:\Windows\Prefetch
Step 6: To delete the contents of the Prefetch folder, type:
del /q *
Step 7: Type exit and press Enter to close the Command Prompt.
Don't forget to empty the Recycle Bin after deleting files to reclaim additional space.
Automate the Cleanup Process in Windows.
Deleting temp files using Disk Cleanup or Command Prompt is a manual process but you can also automate this process using Window's Settings.
To schedule the cleanup process in Windows 11, Go to Settings > System > Storage > Configure Storage Sense or run it now. Enable Storage Sense to automatically free up space by deleting temporary files and you also change the default schedule time based on your need.
Another quick and easy method to automate this cleanup process is by creating a Batch File.
Create a batch file containing the cleanup commands (shown below) and run it whenever needed. For example, create a text file with the extension .bat and include the commands:
cd %temp%
del /s /q *
cd C:\Windows\Prefetch
del /q *
Note: Be cautious when using the del command, especially with wildcard characters (*). Ensure you are in the intended directory before executing these commands to avoid unintentional data loss.
By following these steps and incorporating these tips, you can efficiently manage and delete temporary files on your Windows system, ensuring optimal performance and ample disk space. Regular cleanup is a proactive measure for maintaining a streamlined and responsive computing environment.
No comments:
Post a Comment