How to delete temporary files in Windows 11; Temporary files in Windows 11 are files that the operating system and applications store on the device for a period of time. This means that this data is not critical for normal operation. Windows 11 has many different temporary files, for example, leftovers after installing a new version of the system, update logs, error reports, temporary Windows installation files, and so on.
The presence of temporary files usually does not cause any problems. However, over time, they can take up a lot of hard drive space, which can be the reason why your laptop or desktop computer runs out of free space. This may prevent you from updating to a newer version of Windows or from installing third-party software on your computer.
If you’re using Windows 11, there are at least a few ways you can safely delete temporary files to free up space on your computer’s hard drive. These steps are the same for different types of drives: hard disk drive (HDD) or solid state drive (SSD). The term “hard drive” in this article refers to these two types of drives.
On Windows 11, you can use several tools to remove temporary files:
- Memory control.
- Delete temporary files in “Settings”.
- Disk cleanup.
- Windows command line.
- Using a batch file to remove unnecessary data.
- Clearing temporary files manually.
This guide will show you how to delete temporary files in Windows 11 to free up space on your computer’s hard drive. We will look at several methods to solve the problem of junk data without the use of third-party software.
How to Delete Unwanted Windows 11 Files in the Settings App
First, we will try to clear Windows 11 temporary files using the Settings app. The Settings app has a handy tool to clean up temporary files. With this built-in cleaner, you can remove certain categories of temporary files.
This gives you more control over the process of cleaning up temporary files than the “Memory Sense” function.
To delete temporary files in Windows 11, follow these steps:
- Right click on the start menu.
- From the context menu, open Options.
- Enter the “System” tab.
- Click on the “Memory” button located on the right side of the application window.
- In the “Local Disk (C:)” section, click on the “Temporary Files” option.
- Select the temporary files you want to remove from Windows 11. The system automatically activates some items, but you can add other options that are not checked by default.
- Click the Delete Files button.
After you complete these steps, junk files will be removed from your computer, freeing up space for more important data.
Deleting temporary files using Windows Memory Sense
Windows 11 includes a Storage Sense feature that automatically shreds temporary system files and junk app files when they fill up free disk space or after a certain amount of time. Enabling this feature will save you from manually deleting temporary files.
You can activate the “Memory Sense” feature as follows:
- Open Options.
- Log in to System.
- Click on “Memory” on the right.
- In the “Storage Management” section, click on the “Storage Sense” button.
- Check the box next to Keep Windows running smoothly by automatically cleaning system and application temporary files.
- Turn on the toggle switch “Automatically clear user content”.
- In the “Set up cleanup schedules” section, select the appropriate options for when you want Windows 11 to automatically clean up the contents of your disk storage:
- Memory Sense launch options.
- Deleting files from the trash after a certain time period.
- Delete files from the Downloads folder if they have not been used.
- Save local files from the OneDrive folder to the cloud only if that data was also saved to the PC drive.
- Click on the “Start Memory Sense now” button.
After completing these steps, when hard drive space is needed, Windows 11 will automatically delete temporary system and application files to keep your computer running smoothly.
How to delete temporary files using Disk Cleanup app Windows 11
You can also use the Disk Cleanup tool to remove temporary files to free up space on your computer. Disk Cleanup is a built-in tool for cleaning up unnecessary data in the Windows operating system.
To delete temporary files in Windows 11 using Disk Cleanup, follow the steps:
- In the Windows search box, type “disk cleanup”.
- In the “Disk Cleanup: Device Selection” window, the system drive “C:” is selected by default. Click on the “OK” button.
- In the Disk Cleanup (C:) window, check the Temporary Files box.
- Check other items you want to remove, such as Delivery Optimization Files, Temporary Internet Files, Update Log Files, Recycle Bin, System-generated Windows Error Reporting.
- Click on the “OK” button.
- In the window “Are you sure you want to permanently delete these files?” click on the “Delete Files” button.
After completing these steps, temporary files will be permanently deleted from your computer, making room for new files.
Clear Windows 11 Temporary Files on Command Prompt
A powerful tool is built into the operating system – the Windows command line. With this tool, you can destroy unnecessary data on your computer.
Deleting unnecessary files in Windows 11 using the command line proceeds in the following order:
- Type “cmd” into the Windows search box.
- As a result of the search results, click on “Run as administrator”.
- In the command line interpreter window, enter the command, and then press the “Enter” key:
del /q/f/s %TEMP%\*
- Close the command prompt window after deleting temporary files.
Deleting temporary files in Windows 11 using a batch file
You can create a batch file with the extension “*.bat” to perform the necessary tasks, including removing temporary data from the system. After running the commands from the BAT file, unnecessary data is deleted from the computer.
Do the following:
- Open the Notepad app.
- Enter these commands into the Notepad window:
rd %temp% /s /q md %temp%
- Enter the “File” menu.
- In the context menu, click Save As.
- In the “File type:” field, select the “All files” option.
- In the “File name:” field, enter a name for the file, for example, “Delete temporary data.bat”.
You can name the file by any name, the main thing is that it has the “.bat” extension.
- Click on the “Save” button.
Place the created file in a convenient location on your computer. After that, you can double-click on this BAT file to manually run Disk Cleanup of temporary data.
You can add this batch file to startup so that it starts automatically. To do this, copy this file to your startup folder as follows:
- Open File Explorer.
- Paste this path into the address bar of File Explorer:
- Press “Enter”.
- Copy the batch file to your startup folder.
Now, after each Windows startup on the computer, the process of deleting temporary files will take place.
Deleting temporary files manually
On your PC, temporary files are located in the Temp folder. You can manually erase the data in this folder through File Explorer.
Do the following:
- Press the “Win” + “R” keys.
- In the Run dialog box, type “%Temp%” (without quotes) and then click OK.
- Explorer will open the Temp folder window in the user’s profile.
- Press the “Ctrl” + “A” keys to select all the data in this folder.
- Click on the “Delete” button on the toolbar.
A window may open with a message that the action to delete a specific file or folder cannot be performed, this data is currently in use. Check the box next to “Run for all current items” and then click the “Skip” button.
Clean up temporary files in another location along the path:
You can delete temporary Internet files in the hidden AppData folder located in the user profile along the path:
Finally, clear the contents of the Recycle Bin.
Some PCs are running out of storage space. Due to lack of space, problems begin: the computer starts to slow down, other software cannot be installed on the device, and the like. In Windows 11, there are several ways to delete temporary files that are taking up space on your system drive. You can free up gigabytes of disk space by deleting temporary data using the built-in tools in Windows 11 or manually.