Temp Files Not Deleting on Windows 11? How to Clear Them

Avatar photo
Temp Files Not Deleting on a Windows 11 laptop in a home office

Why leftover files will not clear

If you have temp files not deleting on Windows 11, Storage Sense finishes with almost no space freed, Disk Cleanup sits on a file, or File Explorer says a Temp item is in use. Those leftovers come from installers, browsers, updates, and apps, and they are supposed to

go away when the job is done.

These are the usual causes:

  • A running app still has a temp file open, so Windows skips it.
  • Storage Sense or Disk Cleanup is waiting on Windows Update or another service.
  • You need administrator permission for C:\Windows\Temp.
  • A stuck update cache is filling the drive and blocking cleanup.

The steps below follow Microsoft’s own order: use Storage Sense or Disk Cleanup first, then clear the folders by hand, and only then use Safe Mode.

Use Storage Sense or Disk Cleanup first

Microsoft’s How to delete temporary files article recommends Storage Sense and Disk Cleanup before you browse the Temp folders. The same idea appears in Free up drive space in Windows.

  1. Open Settings > System > Storage.
  2. Open Temporary files, wait for the scan, select the categories you want, and choose Remove files.
  3. Or open Storage Sense, review what it will clean, and run it now.

If Settings is sluggish while the drive is nearly full, our guide to a slow File Explorer on Windows 11 can help after you recover some space.

If Temporary files still lists items after Remove files, close your apps and continue with the fixes below rather than clicking Remove repeatedly.

Before you start

Create a restore point before you stop update services or rename SoftwareDistribution. That gives you a way back if a later step leaves Windows Update in a worse state.

  1. Press Windows key, type Create a restore point, and open System Properties, or run sysdm.cpl and select System Protection.
  2. Select the system drive, usually C:, then choose Configure.
  3. If protection is off, turn it on and set a modest disk usage amount, then select OK.
  4. Select Create, name the point Before temp file cleanup, and wait until Windows reports that the restore point was created.

Stay inside %temp% and C:\Windows\Temp if you delete files by hand. Do not delete the Temp folders themselves, and do not empty random system directories. On a work or school PC, ask IT before you stop Windows Update services.

Note whether Storage Sense finishes with almost no space freed, Disk Cleanup sits on a scan, or Explorer says a file is in use. Close browsers and installers before you start.

Have one more test ready: after each fix, reopen Settings > System > Storage > Temporary files and see whether the same categories are still listed. If the list shrinks and free space goes up, stop there. If temp files not deleting continues, go to the next fix rather than clicking Remove files over and over.

Write down how much free space you have before you start, then check it again after each cleanup. That is a better measure than the Temporary files page alone, because some items are skipped without a clear error.

If you delete temp folder contents by hand, stay in the two official locations and choose Skip when Windows says a file is in use. Applying Skip to all remaining items is faster and safer than forcing a file that an installer still needs.

Leave the PC on AC power if you are about to stop update services or run Disk Cleanup on a nearly full drive. Those jobs can take a while, and you should let them finish.

On a work or school PC, leave Windows Update running if policy manages it. You can still clear %temp% and run Disk Cleanup. Ask IT before you rename SoftwareDistribution.

When Storage Sense later runs on a schedule and the drive stays reasonably free, stop. Further cache deletions will not keep temp files from being created, and they can delay the next quality update if you empty the download folder too often.

A third-party “cleaner” is not required for this job. Storage Sense, Disk Cleanup, and the official Temp folders are enough, and unofficial tools can remove more than you intended.

If disk cleanup stuck appears only while a large update is downloading, pause the cleanup, let the update finish or fail clearly, then run Disk Cleanup again. A mid-download cache is supposed to be there until Windows is done with it.

If storage sense not working is limited to one account, try the same cleanup in a second administrator account. A locked profile file will not block C:\Windows\Temp, but it can block items in that user’s %temp% folder.

When temporary files not deleting is limited to one category, such as Delivery Optimization or Update cleanup, select only that category after the services are running again, rather than clearing every box on the page.

Quick-fix checklist for Temp Files Not Deleting on Windows 11

Work through those steps in order. After each change, return to Storage > Temporary files or Disk Cleanup and see whether the same items are still listed.

Fixes when temp files not deleting in Windows 11

1. Close apps if storage sense not working after the first pass

Files that are still open cannot be removed. Close browsers, installers, chat apps, and anything you recently used, then reopen Settings > System > Storage > Temporary files and remove the list again.

If Storage Sense still frees nothing after a second try, the wizard may be waiting on a locked update file. Continue with Disk Cleanup and the manual folders, then come back to Storage Sense after a restart.

If storage sense not working continues after you close apps, treat this as a locked-file or update-cache problem, not a broken Settings page. A second pass often works after Disk Cleanup or a restart.

2. Run Disk Cleanup as an administrator if disk cleanup stuck appears

Disk Cleanup can remove leftover Windows setup files that the Settings page sometimes leaves behind.

  1. Press Windows key, type Disk Cleanup, and select Run as administrator.
  2. Choose the Windows drive, usually C:, and wait for the scan.
  3. Select Clean up system files, wait again, then check Temporary files and any other safe categories you want.
  4. Choose OK, then Delete Files.

If you see disk cleanup stuck on the scan or on “Cleaning up,” wait a few minutes first. If it still has not moved, close the window, restart the PC, and run it again with no other apps open.

Run Disk Cleanup as an administrator when you need leftover Windows setup files. Leave the window alone while it scans; a long pause is not always a hang on a nearly full drive.

3. Delete temp folder contents by hand

When you clear those items yourself, stay inside the official Temp locations and skip any file Windows says is in use.

  1. Press Windows key + R, type %temp%, and press Enter.
  2. Press Ctrl + A, then Delete. When Windows says a file is in use, choose Skip and apply that to all remaining items.
  3. Open C:\Windows\Temp (you may need to confirm administrator access) and delete what you can, again skipping locked files.

Do not delete the Temp folder itself, and do not reach into random system directories. Microsoft’s guidance is to clear the contents, not the folders, when you delete temp folder leftovers by hand.

Success looks like most items leaving %temp%, with only a few skipped files that were in use. Skip those, then retry in Safe Mode if you still need the space.

4. Clear a stuck Windows Update cache when temporary files not deleting

If leftovers remain after a failed or repeating Windows Update, the download cache may be holding the space.

  1. Right-click Start and open Terminal (Admin) or Command Prompt (Admin).
  2. Run these commands one at a time:
net stop wuauserv
net stop bits
net stop cryptsvc
  1. In File Explorer, open C:\Windows\SoftwareDistribution\Download and delete the files inside it, or rename the SoftwareDistribution folder to SoftwareDistribution.old.
  2. Start the services again with net start cryptsvc, net start bits, and net start wuauserv, then restart the PC.

After the restart, run Storage Sense or Disk Cleanup once more if temp files not deleting still shows in Settings.

Stop the three services before you empty the download cache, then start them again after the files are gone. If temporary files not deleting continues after that, use Safe Mode rather than deleting the whole SoftwareDistribution folder twice.

5. Retry the cleanup in Safe Mode

Safe Mode loads fewer apps, so locked temp files often become deletable.

  1. Open Settings > System > Recovery, select Restart now under Advanced startup, then go to Troubleshoot > Advanced options > Startup Settings > Restart.
  2. Choose Safe Mode (or Safe Mode with Networking if you also need to download a tool).
  3. Repeat the %temp% and C:\Windows\Temp deletions, then run Disk Cleanup again.
  4. Restart normally and confirm the space was freed.

Safe Mode is the right next step when files in %temp% stay locked on a normal desktop. After you return to a normal session, run Storage Sense once more and confirm the free space increased.

6. Check permissions and exclude security software for a test

If every deletion fails with a permission error, you may not be elevated, or a security product may be locking the files.

  1. Make sure you accepted the administrator prompt when opening C:\Windows\Temp.
  2. Temporarily pause a third-party antivirus only long enough to retry the deletion, then turn it back on.
  3. If a removable device is involved in the clutter, also check that Windows can see the hardware correctly. A failing accessory can throw related errors, such as in our guides to a USB headset Code 10 or a device descriptor request failed message.

Turn security software back on as soon as the deletion finishes. A short pause is only for the test, not a lasting change.

If you still cannot delete temp folder leftovers after the permission prompt, retry in Safe Mode rather than changing the security settings on the whole Windows directory.

Keep a short note of the free space before and after each pass, in case temp files not deleting returns after the next quality update and you need to repeat the same checks on this PC.

Once free space is back and Storage Sense can finish a pass, you can leave a cleanup schedule on and stop changing folders by hand on this account after the next scheduled run finishes cleanly. Keep the restore point until you are sure Windows Update still runs afterward.

If the leftovers still will not clear: deeper repair

If Storage Sense, Disk Cleanup, and a manual Temp deletion have already been tried, look for a service or a filter that is holding the files.

  1. Press Windows key, type Event Viewer, and open it.
  2. Check Windows Logs > Application and Windows Logs > System around the times the cleanup failed.
  3. Look for Windows Update, Storage Sense, or disk errors, then update or retry the named item.

A clean boot can show whether a startup app is locking temp files.

  1. Press Windows key + R, type msconfig, and press Enter.
  2. On the Services tab, select Hide all Microsoft services, then Disable all for the test only.
  3. On the Startup tab, open Task Manager and disable non-Microsoft startup apps.
  4. Restart, then run Disk Cleanup and clear %temp% again.
  5. When you finish, open System Configuration, choose Normal startup, and restart.

If temp files not deleting continues in every account after Safe Mode and a cleared update cache, an in-place repair of Windows 11 with official Microsoft installation media can restore Storage Sense and Windows Update while keeping your files. Back up first. That repair will not create free space on a dying disk, so copy important files off if the drive is already nearly full or reporting errors.

Quick reference

What you seeTry this first
Settings lists temp files but nothing is removedClose apps and rerun Storage Sense (Fix 1)
The Disk Cleanup scan never movesRestart, then run Disk Cleanup as administrator (Fix 2)
Some items in %temp% will not deleteSkip files in use, then retry in Safe Mode (Fixes 3 and 5)
Storage Sense frees nothing after a failed updateClear the SoftwareDistribution download cache (Fix 4)
Access denied in C:\Windows\TempConfirm the administrator prompt (Fix 6)
Cleanup stalls after a failed updateStop the update services, then clear the download cache (Fix 4)
Only a few files in %temp% will not deleteSkip them, then retry in Safe Mode (Fixes 3 and 5)
Storage Sense works after a restartStop there; leave a schedule on if you want ongoing cleanup

FAQ

Why do selected items remain even after I remove them in Settings?

Something still has those files open, or an update service is using them. Close your apps, restart, and use Disk Cleanup as an administrator.

Is it safe to clear the contents of the Temp folders?

Yes, if you stay in %temp% and C:\Windows\Temp and skip files that are in use. Do not delete the folders themselves or files outside those locations.

Why does Storage Sense stall on a nearly full drive?

The feature can stall when Windows Update is mid-download or when the drive has almost no room to work. Free a little space with Disk Cleanup or a manual Temp deletion, then run Storage Sense again.

What should I do when leftovers remain after Disk Cleanup says it finished?

Look in %temp% for leftovers, then use Safe Mode. A finished wizard can still skip locked items without a clear error.

Why are temporary files not deleting after Storage Sense says it finished?

A running app or an update service may still have those files open. Close your apps, run Disk Cleanup as an administrator, then retry in Safe Mode if the same items remain.

What should I do if storage sense not working on a nearly full drive?

Free a little space first with Disk Cleanup or a manual %temp% deletion, then run Storage Sense again. The feature can stall when the drive has almost no room to work.

Can I stop Windows from creating temp files?

Not completely. Apps and Windows need them while they work. Storage Sense can delete leftovers on a schedule so they do not pile up.

Sources

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post
WiFi Keeps Disconnecting on a Windows 11 laptop in a home office

Wi-Fi Keeps Disconnecting on Windows 11? How to Fix It

Related Posts