How To Delete Temporary Files On Windows 11, 10

Increase your storage space and run the operating system smoothly by deleting all temporary files using these methods.

How To Delete Temporary Files On Windows 11

Key Points

  • To delete the temporary files, go to Settings > System > Storage > Temporary Files. Select the temp files and click Remove Files.
  • C:\Windows\Temp folder contains OS-specific files, while C:\Users\[username]\AppData\Local\Temp contains app-specific temporary data. You can clean both manually using File Explorer.
  • To clean the %Temp% folder from the Command Prompt, use the command “del /q /f /s %TEMP%*”.

Temporary files, or “Temp” files are files that are used during other major processes, like installing an app, updating the OS, etc. Once the process is completed, the files become useless. Most often, these temporary files are removed automatically once they are no longer needed, however, over time, they tend to accumulate and are left behind on your PC.

Although most temporary files are tiny, they can take up significant disk space when combined. Since they are not needed for any purpose any longer, you can safely delete them (permanently) from your computer.

Temporary files are of different types. This guide illustrates how to delete all kinds of temp files on a Windows 11 computer since the OS provides so many different ways. Note that these methods will also work for Windows 10.

What are temporary files in Windows

Temporary files are those needed by the operating system, or another app or program only temporarily, while they are in use. When the task at hand is performed, the temporary files can be discarded without consequences.

For example, if you download a setup file from the internet and install an app using the downloaded package, the setup file is useless once the app has been installed. Therefore, you can safely delete the app without causing any harm to the OS, or the app.

A temporary file can be any one of the following files:

  • Downloads
  • Windows Update files
  • Windows Upgrade Log Files
  • Windows ESD Installation Files
  • Temporary files from apps and programs
  • Temporary internet files
  • Thumbnails
  • Microsoft Defender Antivirus
  • Device driver packages

All of the above mentioned files can be removed from your PC. The different file types are stored at different locations inside Windows, by default. Therefore, you may need to apply more than one method to get rid of all sorts of temporary files.

Temp vs. %Temp% folders

Before discussing the various methods to clean up temporary files on Windows 11, you must first understand the difference between the Windows temporary data folder, and the application-related temporary data folder.

When logged into Windows, you will find two “Temp” folders: one will have the path “C:\Windows\Temp,” while the other will be at “C:\Users\[username]\AppData\Local\Temp.” The former stores the OS-related temp files, while the latter stores the user and app-specific temp files.

You can access these temp files through File Explorer and navigate to them, or through the Run Command box. To open the “Temp” folder at C:\Windos, run this command:

Temp

To open the “Temp” folder at C:\Users\[username]\AppData\Local, run this command instead:

%Temp%

Benefits of cleaning up temp files

Removing temporary files from your computer not only frees up storage space but also has another benefit.

Cleaning up temporary files aids in running the computer smoothly. Temporary files often cause issues with Windows, like being unable to install a Windows update or an app. If the temporary files get corrupted, they can behave abnormally, interfering with the system’s operation.

Therefore, it is my recommendation that you perform a regular cleanup of the temporary files on your PC from time to time.

Now that you understand the difference between the temporary file types, stored locations, and the benefits of deleting them, let’s continue to see how to clean them up.

How to cleanup temporary files in Windows

Delete temporary files from Windows Settings

Windows 11 provides convenient methods to delete the temporary files directly from Windows settings. Use the following steps to delete temp files with ease:

  1. Press the Windows Key + i to open the Settings app.

  2. Click System.

  3. Click Storage.

    Open the Storage settings page
    Open the Storage settings page
  4. Go to “Temporary files.”

    Open Temporary files
    Open Temporary files

    Alternatively, you can also click “Cleanup recommendations” and then click “See advanced options” to end up on the same “Temporary files” settings page.

  5. Select the files that you want to remove and click “Remove files.”

    Select temporary files and delete them from Settings app
    Select temporary files and delete them from Settings app

Windows will now begin removing the temporary files that you selected.

Delete temporary files using Storage Sense

Items that you don’t need, such as temporary files and deleted items in the Recycle Bin, can be automatically removed by Storage Sense to free up disc space. Here are the steps to delete temporary files using Storage Sense:

  1. Press the Windows Key + i to open the Settings app.

  2. Click System, and then go to Storage.

    Open the Storage settings page
    Open the Storage settings page
  3. Toggle the slider in front of “Storage Sense” to enable it, and then click the option again to go to the Storage Sense settings page.

    Enable Storage Sense and open it
    Enable Storage Sense and open it
  4. Check the “Keep Windows running smoothly by automatically cleaning up temporary system and app files” option.

    Allow Storage Sense to automatically clean up temporary files
    Allow Storage Sense to automatically clean up temporary files

After performing these steps, Storage Sense will automatically begin cleaning up the system and app temporary files in the background.

Delete temporary files using Disk Cleanup

Disk Cleanup is a Windows-native tool that does exactly what its name implies. Previously, the Disk Cleanup tool was accessible via the partition’s properties. However, this option has been removed from Windows 11 recently, but the tool is still available.

Here are the steps to use Disk Cleanup to delete temporary files from your PC, one disk at a time:

  1. Open the Start menu and search for “Disk Cleanup.”

  2. Launch the Disk Cleanup app.

    Alternatively, you can launch the Disk Cleanup tool by running “cleanmgr” in the Run Command box.

  3. Select the boot drive (Windows installation drive) from the drop-down menu and click OK.

    Select drive in Disk Cleanup
    Select drive in Disk Cleanup
  4. Click “Clean up system files.”

    Cleanup system files with Disk Cleanup 1
    Cleanup system files with Disk Cleanup
  5. You will be asked to select a drive again. Select the same drive and click OK.

    The tool will then scan the drive.

  6. Now select the files that you want to delete and click OK.

    Select files to delete with Disk Cleanup
    Select files to delete with Disk Cleanup
  7. When asked for confirmation, click “Delete files.”

    Confirm temporary file deletion
    Confirm the temporary file deletion

Disk Cleanup will now begin removing the selected files from your PC.

Delete temporary files from Command Prompt

If you prefer using the Windows command line instead of the GUI-based interface, then you can use the Command Prompt to delete the temporary files. Here is how:

  1. Press the Windows Key + R to open the Run Command box.

  2. Type in “cmd” and press CTRL + Shift + Enter to run an elevated Command Prompt.

  3. Now execute the following command to delete all app-specific temporary files:

    del /q /f /s %TEMP%\*
    Delete temporary files from Command Prompt
    Delete temporary files from Command Prompt

With this command, all temporary files in “C:\Users\[username]\AppData\Local\Temp” will be deleted. Note that some files, that may still be in use, will be skipped.

Delete temporary files using File Explorer (manually)

You can also delete the temp files in either of the “Temp” folders using File Explorer. Here is how:

  1. Open File Explorer and navigate to the respective “Temp” folder.

    • For OS-specific files: C:\Windows\Temp
    • For app and user-specific files: C:\Users\[username]\AppData\Local\Temp
  2. Press CTRL + A to select everything.

  3. Hold down the Shift key and then press Del.

    This will delete everything that is selected, permanently.

  4. When asked for confirmation, click Yes.

    confirm deletion
    confirm deletion
  5. [Conditional] If administrative rights are needed, select “Do this for all current items” and click Continue.

    Provide administrative rights for restricted folders
    Provide administrative rights for restricted folders
  6. [Conditional] If prompted with a “File in use” dialog box, select “Do this for current items” and click Skip.

    This will skip the files that cannot be deleted right now.

    Skip items in use
    Skip items in use

The temporary files in the Temp folder will now be deleted permanently.

Conclusion

This concludes all the methods to clean up temporary files in Windows 11. Note that these methods also apply to Windows 10, with a slightly different layout of the Settings app. Even so, the options are still there.

Note that you cannot just adopt one of the methods above and expect all sorts of temporary files to be cleaned from your PC. Depending on what type of temp files are available on your computer, you may just need to adapt 2 or more of these.

That said, I recommend that you start from the Settings app and clean out all temporary files from there first. Then, use File Explorer to manually examine and delete all temp files in both of the “Temp” folders. This should clear all sorts of temporary files.

Latest posts
Uninstall Microsoft Edge on Windows 11 10
How To Uninstall Microsoft Edge On Windows 11, 10

You are no longer stuck with Microsoft Edge as the proprietary browser. Don’t need it? Uninstall Edge with these steps.

View post
How To Fix Windows Update Error Code 0x800f081f
How To Fix Windows Update Error Code 0x800f081f

This error can be annoying to fix, since these isn’t only one cause. Here are all the methods to fix the error 0x800f081f.

View post
How To Remove Or Replace Image Background Using Photos App In Windows 11
How To Remove Or Replace Image Background Using Photos App In Windows 11

Microsoft Photos allows you to edit only the background of your images. Replace or simply remove them using these methods.

View post

Leave the first comment