How to delete temporary files on Windows 11

Is your computer running out of space? If so, Windows 11 has a few ways to remove those temporary files wasting space on the main drive.

Windows 11 delete temp files
Windows 11 delete temp files
  • To delete temp files on Windows 11, open Settings > System > Temporary files, check the items, and click “Remove files.”
  • To those files from the “Temp” folder, you can run the “del /q/f/s %TEMP%\*” command in Command Prompt or select and delete the files from File Explorer. 
  • You can also use the Disk Cleanup tool and Storage Sense settings to delete temporary files from Windows 11.

UPDATED 11/10/2023: On Windows 11, you can delete temporary files in at least four ways, and in this guide, I’ll explain each process. Temporary (or “temp” for short) files are those that the system and apps store on the device temporarily, meaning they are not critical to the regular operation. For instance, Windows 11 has many temporary files, such as those leftover files after installing a new version, upgrade logs, error reporting, temporary Windows installation files, etc.

Temp files typically do not cause any problems. However, over time, they can take up a lot of space on the hard drive, which can be why the laptop or desktop computer is running out of storage or preventing you from upgrading to a new version. If you have Windows 11, you have at least a few ways to safely remove temporary files to free up space using the Settings app and the Disk Cleanup tool. Also, you can delete some of these files manually through File Explorer and Command Prompt.

In this guide, you will learn how to quickly remove those non-essential files on Windows 11 to free up space or reclaim storage after installing a feature update.

Delete temporary files on Windows 11 from Settings

To delete temporary files on Windows 11, use these steps:

  1. Open Settings on Windows 11.

  2. Click on System.

  3. Click the Storage page on the right side.

  4. Under the “Local Disk” section, click the Temporary files setting.

    Open Temporary files

  5. Select the temporary files to remove from Windows 11.

    Quick note: If you check the “Downloads” option, it will delete everything on the “Downloads” folders. It is recommended not to choose this option or relocate any important files to another location before proceeding.
  6. Click the Remove files button.

    Remove Windows 11 temp files

Once you complete the steps, junk files will be removed from your computer, freeing up space for more important files.

Delete temporary files on Windows 11 from Storage Sense

To remove files wasting space automatically from Storage Sense, use these steps:

  1. Open Settings.

  2. Click on System.

  3. Click the Storage page on the right side.

  4. Under the “Storage Management” section, click the Storage Sense setting.

    Open Storage Sense

  5. Check the “Keep Windows running smoothly by automatically cleaning up temporary system and app files” option.

    Storage Sense delete temp files

  6. (Optional) Turn on the “Automatic User content cleanup” toggle switch.

  7. (Optional) Configure how Windows 11 should clean up content automatically.

After you complete the steps, when space is needed, Windows 11 will automatically delete system and app temp files to help keep the computer running smoothly.

Delete temporary files on Windows 11 from Disk Cleanup

To remove temporary files on Windows 11 using Disk Cleanup, use these steps:

  1. Open File Explorer.

  2. Click on This PC from the left pane.

  3. Right-click the Windows 11 installation drive and select the Properties option.

    Open drive properties

  4. Click the Disk Cleanup button.

    Open Disk Cleanup

  5. Click the “Clean up system files” button.

  6. Check the items you want to delete. For example, Temporary Windows Installation Files, Windows upgrade log files, Recycle Bin, Temporary Files, and System created Windows Error Reporting.

    Select temp files to cleanup

  7. Click the OK button.

  8. Click the Delete Files button.

Once you complete the steps, temporary files will permanently be deleted from your computer, making room for new files.

Delete temporary files on Windows 11 from Temp folder

On Windows 11, applications like Google Chrome, Microsoft Edge, and many others can store non-essential files in the “Temp” folder. When using the “Disk Cleanup” tool or the “Temporary files” settings, the system will also clean up the “Temp” folder, but you can also safely delete these files manually through File Explorer and Command Prompt.

Method 1: From File Explorer

To delete the files from the Temp folder through File Explorer, use these steps:

  1. Open Start.

  2. Search for Run and click the top result to open the app.

  3. Type the %Temp% environment variable.

  4. Click the OK button.

  5. Click the See more (three dots) menu and choose the Select all option.

  6. Click the Delete button.

    Windows 11 delete files in Temp folder

  7. Check the “Do this for all correct items” option.

    Delete Temp files with access denied error

  8. Click the Continue button.

  9. Check the “Do this for all correct items” option again.

  10. Click the Skip button.

    Quick tip: You can safely skip those files that can not be removed since cleaning up every file may not be possible if the app or process is still running in the background.

After you complete the steps, applications will once again start creating files in the “Temp” folder.

Method 2: From Command Prompt 

To delete temp files from Command Prompt, use these steps:

  1. Open Start.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to delete the temp files and press Enter:

    del /q/f/s %TEMP%\*

    Command Prompt delete temp files

Once you complete the steps, the command will clean up the “Temp” folder from temporary files created by applications installed on Windows 11.

Update November 10, 2023: This guide has been updated to ensure accuracy and reflect additional instructions.

About the author

Mauro Huculak is a Windows How-To Expert who started Pureinfotech in 2010 as an independent online publication. He has also been a Windows Central contributor for nearly a decade. Mauro has over 14 years of experience writing comprehensive guides and creating professional videos about Windows and software, including Android and Linux. Before becoming a technology writer, he was an IT administrator for seven years. In total, Mauro has over 20 years of combined experience in technology. Throughout his career, he achieved different professional certifications from Microsoft (MSCA), Cisco (CCNP), VMware (VCP), and CompTIA (A+ and Network+), and he has been recognized as a Microsoft MVP for many years. You can follow him on X (Twitter), YouTube, LinkedIn and About.me. Email him at [email protected].