Disk Cleanup often leaves large Temp folders behind because some files are still in use or Windows has not finished releasing them; restart Windows once, then remove only items that are no longer needed. If you delete the wrong files, you can break an install or cause app errors. This guide shows which Temp folders Disk Cleanup may miss, why they persist, and how to clear them safely.

What you’ll need before you start

  • Access to the Windows account that owns the temp files.
  • Administrator rights for C:\Windows\Temp and some update leftovers.
  • Task Manager and Resource Monitor, both built into Windows.
  • File Explorer with hidden items visible if you need to inspect folders.
  • Time to close browsers, installers, and sync apps before deleting anything.

Safest manual cleanup steps

The safest path is to clear obvious leftovers first, then deal with locked files only after a restart. Run Disk Cleanup first, close any apps still writing to temp, and delete only files that are clearly no longer in use. If a folder refuses to clear, stop and identify the process before forcing anything.

  1. Run Disk Cleanup first. Open Start > Disk Cleanup or run cleanmgr.exe, choose the system drive, then select Temporary files, Thumbnails, DirectX Shader Cache, Windows Update Cleanup, and Delivery Optimization Files when available.This clears the easy categories before you touch folders by hand. Behavior varies by Windows version and cleanup category, so a large Temp folder can still remain afterward.
  2. Close the active apps. Shut down browsers, installers, office apps, launchers, and sync tools, then wait briefly before retrying. That gives background processes time to release temp handles.If a browser or installer is still running, deleting its temp files usually fails or the files are created again right away.
  3. Check the folder contents. Open %TEMP% and %TMP% from File Explorer, then sort by Date modified. Files and folders that are not tied to a current install or download can often be removed from %TEMP% and %TMP%.These usually resolve to %LocalAppData%\Temp and hold app caches, installers, logs, and transient files. If a file date is current and the app is still open, leave it alone.
  4. Inspect locks before forcing deletion. Open Task Manager > Processes, then Resource Monitor > CPU > Associated Handles and search the file name or folder. End the related app only if you can identify it confidently.This tells you why deletion fails. Browser, installer, and update components often hold handles open even when the folder looks idle.
  5. Retry after one reboot. Restart Windows once, then re-open the same folder and delete only what remains. If the folder shrinks after reboot, the leftover items were likely still in use before the restart.For example, C:\Windows\Temp may still contain files after an installer or a failed rollback. A reboot can release them without further action.
  6. Use Safe Mode if needed. Boot into Settings > System > Recovery > Advanced startup, then try the same deletion in Safe Mode if normal startup still blocks it.Safe Mode reduces active file locks, which helps with stubborn temp folders. Use it as a fallback, not the default.

Temp cleanup safety matrix

Folder path Typical contents Deletion risk Admin rights needed? Reboot recommended? Common lock reasons
%TEMP% / %TMP% App caches, installers, logs, transient downloads Low to medium; delete idle files only No, for your own profile Yes, if files stay locked Browser tabs, installers, sync clients, editor autosave
C:\Windows\Temp System-wide temp data, service leftovers, installer fragments Medium; some files are in use by Windows services Yes, usually Yes, often Windows Installer, services, update components
Browser temp/cache paths Cache files, cookies, session data, site assets Low if the browser is closed; medium if open No for the signed-in user Only if the browser keeps files open Open browser process, background tabs, extensions
Installer leftovers Setup logs, extraction folders, MSI scratch files Medium; may be needed until setup finishes or rolls back Sometimes Yes, after failed setup Windows Installer, pending rollback, paused setup
Windows Update temp files Pending downloads, rollback artifacts, patch leftovers Medium to high if updates are incomplete Yes, often Yes, usually Update service, pending reboot, servicing stack activity

When should you reboot or use Safe Mode?

A reboot is a common next step if the folder size barely changes after a normal delete or if File Explorer reports that a file is open in another process. Safe Mode is the next step when a reboot still leaves the same locked items behind. Do not use Safe Mode for every cleanup; it is a fallback for stubborn locks, not a routine requirement.

If that didn’t work, try this next

  1. Check update activity. Open Settings > Windows Update and confirm the system is not downloading, installing, or waiting to restart. Leave update-related temp files alone until the pending state clears.
  2. Stop the app source. Open Task Manager > Processes, end only the process that owns the temp file, then delete the folder again. If you cannot identify the process, leave the file for later.
  3. Boot into Safe Mode. Use Settings > System > Recovery > Advanced startup, then retry the deletion. This can release locks from browsers, launchers, and helper services that start automatically in normal mode.

Common first-timer mistake is deleting a fresh installer cache because it looks large. If the setup is still running, removing those files can corrupt the installation.

Common mistakes

The biggest errors come from cleaning the wrong folder, using force first, or deleting while a process still owns the file. Temp folders are not all the same. Your own profile temp path is different from C:\Windows\Temp, and update leftovers may need a reboot before they are safe to remove.

  • Do not delete files you do not recognize while an app, browser, or update is open.
  • Do not mix up %TEMP% with C:\Windows\Temp; the risk and permissions are different.
  • Do not clean another user’s temp folder while that user is signed in.
  • Do not assume a large folder is junk if the timestamp is current.
  • Do not skip a reboot before trying force-delete tools.

Should you clean other user profiles too?

A laptop displays File Explorer with a large folder icon on screen
Open profile folders can be checked separately before clearing temporary files.

Only clean another profile’s temp folders when that user is signed out. On a multi-user PC, one account’s %TEMP% can be safe to clear while another session is still active, but the active session may recreate the same files immediately. For shared machines, clean each idle profile separately and leave the logged-in user alone.

Open C:\Users, check each profile folder, and target only inactive accounts. If a profile is currently signed in, let that user close apps and clear their own temp files so you do not interrupt an open browser, installer, or sync task.

Prevention

Use Settings > System > Storage > Storage Sense for recurring cleanup. It can remove temporary files and recycle bin items automatically, but it is not identical to Disk Cleanup categories, so keep checking update leftovers and locked app caches separately when a folder keeps coming back.

Keep reading

Frequently asked questions

Why does Disk Cleanup leave behind large Temp folders?

Disk Cleanup can skip files that are open or pending. If the folder contains live installer data, update artifacts, or a browser cache still held by a process, the utility leaves those items in place until they are released or Windows is restarted.

Which Temp folders are safe to delete manually?

Your own %TEMP% and %TMP% files are usually safe when the related app is closed. C:\Windows\Temp is safe only with admin rights and more caution. Browser caches and installer leftovers are safe only after the browser or installer is fully closed.

How do I tell whether a Temp file is still in use?

Use Task Manager > Processes first, then Resource Monitor > CPU > Associated Handles and search the file name. If a process appears, that file is still open. If nothing shows, a reboot can help release it.

What is the safest way to clear %TEMP% and C:\Windows\Temp?

Clear %TEMP% from your own account after closing apps, then delete only idle files and folders. For C:\Windows\Temp, use an administrator account, remove only obvious leftovers, and reboot if Windows says the file is in use. If the same files remain, switch to Safe Mode rather than forcing a delete.

Why do some Temp files come back after reboot?

They return when the same app, browser, updater, or installer runs again and recreates its working files. Windows Update may rebuild pending download and rollback files after a restart if the update has not fully completed. That usually means the source process, not the folder, needs attention.

Should I delete Temp files from other user profiles too?

Yes, but only after that user signs out. On a shared PC, another profile’s temp folder can be cleaned safely when it is idle, but active sessions will recreate files or block deletion. Never clear a signed-in user’s temp folder from the outside while that account is still working.

What should I do if a temp file or folder won’t delete?

Restart Windows once, then try again. If it still fails, identify the locking process in Resource Monitor or move to Safe Mode through Settings > System > Recovery > Advanced startup. Leave update-related files alone until Windows Update shows no pending action, because those files can still be part of an active update state.

How can I avoid breaking an app or update while cleaning temp files?

Clean only when the related app is closed, the update is idle, and the file is clearly stale. Use Disk Cleanup or Storage Sense first, then manual deletion for leftovers that are no longer needed. If a folder is still changing, wait. That is safer than forcing removal during an active write.