Home Windows 6 Ways to Delete Temporary Files in Windows 11

6 Ways to Delete Temporary Files in Windows 11

by Geek Insider Staff
17 views

As the name suggests, temporary files are not meant to remain forever in your device. Windows and third-party software use them to store data for a limited time. Therefore, you should not worry when programs create short-term files for all kinds of purposes. While these files are meant to be temporary, no program deletes them when they are no longer needed, hence accumulating on your PC’s hard drive. 

Below are six ways to delete the temporary files, or else they’ll waste a massive bit of your device’s storage space.

  1. Automatically Delete Temporary Files with Storage Sense

Windows 11 has a Storage Sense feature that searches and removes temporary app and system files. You simply need to enable the feature on your PC, and you’ll not stress manually deleting such files. The steps below show you how to activate the automatic Storage Sense.

  1. Hit the search area on your Windows 11 taskbar.
  2. Type “Storage Sense.”
  3. Select the “Turn on Storage Sense” option that appears in the search results.
  4. Toggle the tab beside “Storage Sense” to activate the feature.
Geek insider, geekinsider, geekinsider. Com,, 6 ways to delete temporary files in windows 11, windows
  • Click the arrow sign (>) next to the tab to display the settings.
  • Check the box beside the “Windows Update Cleanup” option.
Geek insider, geekinsider, geekinsider. Com,, 6 ways to delete temporary files in windows 11, windows
  • Enable the “Automatic User Cleanup Content” option.
  • Click on the “Run Storage Sense” drop-down menu.

This option will let you select an automatic cleanup schedule to delete the files.

  • Choose the “Everyday” option to clear the temporary files daily.
  • If you want to use Storage Sense to delete the temporary files manually, click the “Run Storage Sense now” button.
Geek insider, geekinsider, geekinsider. Com,, 6 ways to delete temporary files in windows 11, windows
  • Delete Temporary Files via the Settings App

The Settings app also comes in handy to delete temporary files in your Windows 11. With the cleaner tool, you can choose to delete specific categories of files, thus giving you more control on what to delete and what to leave than Storage Sense. Below are the steps to clean up temporary files through the Settings app.

  1. Press the “Start” button on the taskbar.
  2. Click “Settings.”
  3. Locate the “System” tab and Choose “Storage.”
  4. Click on “Temporary files” to display the cleaner tool.
Geek insider, geekinsider, geekinsider. Com,, 6 ways to delete temporary files in windows 11, windows

To free up the most disk space, you can manually select all the temporary file checkboxes. However, checking the “Windows Update Clean-up” option alone can free up massive space.

  • Finally, click the “Remove Files” button.
  • Delete Temporary Files via Command Prompt

There are many valuable tools in the Command Prompt interpreter, but you only need to enter a quick command into the prompt window to erase temporary data. Follow the steps below to delete temporary files through the Command Prompt.

  1. Hit “WIN+S.”
  2. Type “cmd” in the search text box.
  3. Right-click “Command Prompt” in the results.
  4. Click “Run as Administrator.”
  5. Type “del /q/f/s %TEMP%\*” and hit “Enter.”
Geek insider, geekinsider, geekinsider. Com,, 6 ways to delete temporary files in windows 11, windows
  • Delete Temporary Files with Disk Cleanup

All Windows platforms have a built-in cleanup tool called the Disc Cleanup. The utility helps you get rid of temporary files and much more redundant data. The Disk Cleanup tool comes with check box options for clearing Microsoft Defender options, delivery optimization, log, language resource, and recycle bin. The steps below will guide you to delete temporary files with the Disk Cleanup in Windows 11.

  1. Open the search box in the taskbar.
  2. Type “Disk Cleanup.”
  3. Select “Disk Clean-up” in the results.
  4. Click the “Clean up system files” button at the bottom.
Geek insider, geekinsider, geekinsider. Com,, 6 ways to delete temporary files in windows 11, windows
  • Check the boxes beside “Windows Update Clean-up,” “Internet Files,” and “Temporary Files,” or any other option.
  • Click “OK” at the bottom.
  • Select “Delete Files.”
  • Delete Temporary Files with a Batch File

A batch file consists of a collection of different commands. So, you can set up batch files for numerous tasks, including erasing temporary files. Here’s how.

  1. Open the Start menu.
  2. Click “All Apps.”
  3. Choose “Notepad” on the app list.
  4. Copy this code “rd %temp% /s /q

md %temp%.”

  • Paste the code into Notepad.
Geek insider, geekinsider, geekinsider. Com,, 6 ways to delete temporary files in windows 11, windows
  • Select “File.”
  • Click “Save As.”
  • Choose “All Files.”
  • Type “Delete Temporary Data.bat” in the file name box.
Geek insider, geekinsider, geekinsider. Com,, 6 ways to delete temporary files in windows 11, windows
  1. Select “Desktop” as the location.
  2. Click “Save.”
  3. Now head to your desktop screen and double-click the “Delete Temporary Data” batch file.

The batch file on your desktop will help you erase temporary files just by clicking on it. If you want the batch file to run automatically, add it to the startup through the following steps.

  1. Right-click on the batch.
  2. Select “Copy.”
  3. Enter WIN+R to launch RUN.
  4. Type “%appdata%\microsoft\windows\start menu\programs\startup\” in the Open Box.
  5. Click “OK.”
  6. Paste the batch file into the startup folder.
  7. Clear the Temp Folder Manually

Most of the temporary files in your PC are found in the Temp folder. Therefore, you can manually delete data in that folder through File Explorer. Learn the quick method in the steps below.

  1. Enter “Win+R to launch Run.
  2. Type “%Temp%.”
  3. Click “OK.”
  4.  Highlight all the content in the folder.
Geek insider, geekinsider, geekinsider. Com,, 6 ways to delete temporary files in windows 11, windows
  • Click “Delete.”

Note that the files you delete through this method might end up in the Recycle Bin. So, be sure to empty the folder. Now you have won back some hard drive space by deleting pesky temporary files. The different methods discussed above will help you erase temporary data and free up gigabytes of storage space.

You may also like

Leave a Comment