Can’t Delete Temporary Files in Windows 10

Windows 10 users sometimes encounter several issues with the temporary files:

  • An access denied error appears when you choose to delete temporary files.
Error Message
Error Message
  • For unknown reasons, Disk Cleanup utility will show temporary files occupy 0 KB of disk space even though in reality they contain hundreds of junk files inside temporary directories that are eating up a significant amount of storage space.

temp files windows 10

ST Cleaner download w/ Verisign digital certificate

Use Unlocker Tool

Unlocker is the right tool to deal with file deletion issues. Specify a file or folder that you cannot delete and this tool will automatically terminate it within seconds.

 

Exit All Applications

File deletion operation cannot be performed if the file is in use. This happens when one or more programs are using temporary files to retrieve runtime information. If a particular program name is displayed in error description, close the program. If the program is unknown, exit all open applications, including apps minimized to system tray. Click the Upward Arrow on the far right corner of the Taskbar, right-click an application icon and choose Exit option.

 

Stop Background Processes/ Services

Background processes and services largely go unnoticed. Plenty of background tasks use temporary files to store information. You will not be able to delete temporary files unless you stop the corresponding service/ background process.

  1. Press Windows Key + X; choose Search option.
  2. Type services.msc in the Search Box, and open the Services tool.
  3. You will now see a long list of services. Click the Status column head so that all services will be rearranged.
  4. Stop all unnecessary, Non-Microsoft services. To terminate a service, right-click it and select the Stop option.

 

End & Re-open File Explorer

Kill Explorer.exe process using the Task Manager, reload it again and then try deleting temporary files.

  1. Press Windows Key + X; choose Task Manager.
  2. Click More details icon at the bottom of the user interface. This will expand the window size and display hidden tabs.
  3. Click the Details tab.
  4. Scroll down; right-click explorer.exe and choose End Task option.
  5. After a while, press Windows Key + R keys simultaneously to open up the Run dialog.
  6. Type explorer.exe as the Run command and then click OK. Now try deleting the temporary files.

 

Reboot your System

If you have been facing trouble deleting a temporary file and can’t figure out the application, process or service behind it, just restart your PC. Restarting will fix your issue.

 

Perform Clean Boot

Use clean boot troubleshooting option. It boots your computer in a limited state with minimal programs and drivers. This invaluable tool will prevent programs that access temporary files and folders, hence no error will be displayed while deleting the file(s).

 

Check Folder Protection Settings

At times, administrative permissions are required to view or delete folder contents. Go to the parent directory containing temporary files and provide appropriate folder security permissions.

  1. Click File Explorer icon on the Taskbar.
  2. Right-click the parent folder containing temporary files and choose Properties.
  3. Click the Security tab > Edit button.
  4. Select all of the following checkboxes under the Allow column:
  • Full control
  • Modify
  • Read & execute
  • List folder contents
  • Read
  • Write
  • Special permissions
  1. Click OK | OK.

 

Use Command-lines

As the file cannot be deleted in normal mode, use command-lines with necessary administrative permissions. Fire up an elevated Command Prompt and use the following commands in the same sequence (as provided) with appropriate changes:

  1. Press Windows Key + X; choose Command Prompt (Admin).
  2. Use the following command to change active directory:
  • CD <Folder Path>

      Example:

  • CD C:\Windows\Temp
  1. Use the following command to delete all temporary files from the active directory:
  • DEL /S /Q *.<EXTENSION1> *. <EXTENSION2>

      Example:

  • DEL /S /Q *.TEMP *.TMP *.LOG *.DMP
  1. Use the following command to delete a subfolder containing temporary files along with its subfolders. Do not delete system-created temporary folders.
  • rmdir <Folder Path> [/s]

      Example:

  • rmdir C:\Windows\Temp\001 [/s]

 

Use Short Folder Name

A long folder name may not be compatible with Windows. Make sure that the folder extension does not exceed 3 characters and file name is also short. For example: 8 characters

 

Check Unsupported Characters

Make sure there are no unsupported characters in the folder path. For example \/:*?”<>|

 

Add Folder to “Rename During Next Boot” List

Session Manager in Registry Editor contains a list of all files to be renamed or moved during the next Windows boot process. Refer to this article for complete detailed information.

 

Change UAC Settings

Configure the Control Panel settings to disable User Account Control (UAC) notifications.

  1. Type User Account Control in the Search Box on the Taskbar.
  2. Open Change User Account Control settings from the Search Results.
  3. Move the slider to the extreme bottom and select the Never Notify option.
  4. Click OK.

Raza Ali Kazmi works as an editor and technology content writer at Sorcim Technologies (Pvt) Ltd. He loves to pen down articles on a wide array of technology related topics and has also been diligently testing software solutions on Windows & Mac platforms.

Raza Ali Kazmi

Raza Ali Kazmi works as an editor and technology content writer at Sorcim Technologies (Pvt) Ltd. He loves to pen down articles on a wide array of technology related topics and has also been diligently testing software solutions on Windows & Mac platforms.