🚀 NEW in v2.4.29: 35+ Speed Optimizations added today!Download Now →

Home/Fix/Windows Temporary Files Won't Delete

How to Fix Windows Temporary Files Won't Delete on Windows

Disk Cleanup not removing temp files, Temp folder keeps filling up, or "file is in use" errors when deleting temporary files? Fix stubborn temp file cleanup on Windows 10 and 11.

📖

Main Troubleshooting Guide

How to Fix 100% Disk Usage

Complete symptoms, causes, and step-by-step solutions

Symptoms

You might be experiencing this problem if you notice:

  • C:\Windows\Temp folder contains gigabytes of old files
  • Disk Cleanup runs but doesn't free much space
  • "File in use" or "Access denied" errors when deleting temp files manually
  • %TEMP% folder fills up again within days of cleaning
  • Storage Sense reports it cleaned files but disk space doesn't change
  • Temp files from months or years ago still present
  • Programs creating temp files that never get cleaned up

Common Causes

  • Background processes or services holding locks on temp files
  • Windows Update leaving orphaned download and extraction files
  • Applications not cleaning up after themselves (poor temp file hygiene)
  • Disk Cleanup not running with administrator privileges (skips system temp)
  • Storage Sense configured with too-lenient retention settings
  • Antivirus quarantine files stored in temp directories
  • Windows Installer cache ($PatchCache$) growing unchecked

Solutions

Solution 1: Clean Temp Files in Safe Mode

  1. 1Hold Shift and click Restart → Troubleshoot → Startup Settings → Restart
  2. 2Press 4 for Safe Mode
  3. 3Open File Explorer and navigate to: C:\Windows\Temp
  4. 4Select all (Ctrl+A) → Delete → Yes to all prompts
  5. 5Also clean: %TEMP% (type in address bar — this is your user temp folder)
  6. 6Also clean: C:\Windows\SoftwareDistribution\Download
  7. 7Safe Mode releases file locks that prevent deletion in normal Windows

Solution 2: Run Disk Cleanup as Administrator

  1. 1Open Command Prompt as Administrator
  2. 2Run: cleanmgr /d C: /sageset:99
  3. 3Check ALL boxes including: Windows Update Cleanup, Previous Windows installations, Temporary files
  4. 4Click OK to save the profile
  5. 5Run: cleanmgr /d C: /sagerun:99
  6. 6This runs Disk Cleanup with elevated permissions, cleaning system temp files regular Cleanup misses
  7. 7Windows Update Cleanup alone can recover 5-20GB on systems that haven't been cleaned

Solution 3: Configure Storage Sense

  1. 1Open Settings → System → Storage → Storage Sense
  2. 2Turn ON Storage Sense
  3. 3Click "Configure Storage Sense or run it now"
  4. 4Set "Run Storage Sense" to "Every week"
  5. 5Set "Delete files in my recycle bin" to "14 days"
  6. 6Set "Delete files in my Downloads folder" to "Never" (or your preference)
  7. 7Check "Delete temporary files that my apps aren't using"
  8. 8Click "Clean now" to run immediately

Solution 4: Clean Windows Installer Cache

  1. 1The folder C:\Windows\Installer contains cached MSI/MSP files for installed programs
  2. 2WARNING: Do NOT delete this folder entirely — it breaks software uninstalls
  3. 3Instead, use the Windows Installer Cleanup Utility or PatchCleaner (free tool)
  4. 4PatchCleaner identifies orphaned installer files from already-uninstalled programs
  5. 5Only delete files PatchCleaner marks as safe to remove
  6. 6This can recover 5-30GB on systems with many software installations
FIXES THIS IN 5 MINUTES

Fix Windows Temporary Files Won't Delete Automatically

RescuePC Toolkit includes 109+ automated repairs that fix this problem with one click. No command line knowledge required.

Download Now - Free Trial

No credit card required • Works on Windows 10 & 11

Automated Repairs for This Issue

Browse More System & Core Features Guides

Share this:XRedditLinkedInEmail