Temporary Files Are Not Deleting Completely in Windows 11/10
Temporary files are created by Windows and various applications to help improve performance while programs are running. These files store cached data, installation files, update leftovers, error logs, browser cache, and other information that is meant to be removed automatically when it is no longer needed. However, there are times when these files remain on your computer even after using the Disk Cleanup tool or the Storage settings.
When temporary files are not deleted completely in Windows 11 or Windows 10, they can gradually consume valuable storage space, slow down your computer, and sometimes even cause software or update issues. Fortunately, this problem is usually easy to fix once you understand why it happens.
This guide explains the most effective methods to completely remove temporary files from your Windows PC.
Temporary Files Are Not Deleting Completely in Windows 11/10

If Windows leaves behind temporary files after a cleanup, it usually means that some files are currently being used by running programs, Windows services, or system processes. In other cases, corrupted cache files, pending Windows updates, insufficient permissions, or damaged system files can also prevent complete deletion.
By following the steps below in order, you can safely remove unnecessary temporary files and recover valuable storage space.
Step 1: Close All Running Programs Before Deleting Temporary Files
One of the most common reasons temporary files remain on your computer is because another application is still using them. Windows cannot delete files that are currently open or locked by a program.
Before attempting to remove temporary files, save your work and close every application that is running. This includes your web browser, Microsoft Office programs, media players, photo editors, messaging apps, cloud storage applications, and any software running in the background.
After closing your applications, restart your computer. A restart ends many background processes that continue running even after you close a program. Once Windows starts again, avoid opening unnecessary applications before cleaning temporary files.
Now open Settings, select System, and then choose Storage. Click Temporary Files and allow Windows a few moments to scan your storage. Review the available categories and select the files you want to remove. Finally, click Remove files.
Many users notice that files that previously refused to delete are successfully removed after simply restarting the computer because they are no longer being used by active processes.
Step 2: Delete Temporary Files Using the Run Command
Windows stores temporary files in a dedicated folder that can be accessed directly.
Press Windows + R to open the Run dialog box. Type %temp% and press Enter.
A folder containing temporary files will open. These files were created by different applications over time. Since they are no longer required in most cases, they can usually be deleted safely.
Press Ctrl + A to select everything inside the folder. Then press the Delete key on your keyboard.
During the deletion process, Windows may display a message stating that some files cannot be deleted because they are currently in use. This is completely normal. Simply select Skip for those files and continue deleting the rest.
Next, open the Run dialog again by pressing Windows + R. Type temp and press Enter.
If Windows asks for administrator permission, click Continue. Repeat the same deletion process inside this folder.
Removing files from both temporary folders often clears a significant amount of storage that automatic cleanup tools sometimes leave behind.
Step 3: Use Storage Sense to Remove Remaining Temporary Files
Storage Sense is a useful Windows feature that automatically manages unnecessary files and helps keep your storage clean.
Open Settings and select System. Click Storage and locate Storage Sense.
Turn Storage Sense on if it is currently disabled.
Click Storage Sense to view its settings. Here, you can configure Windows to automatically delete temporary files, recycle bin contents, and downloaded files after a specified period.
Scroll down and select Run Storage Sense now.
Windows will begin scanning your computer for unnecessary files. Depending on the amount of stored data, this process may take several minutes.
Once the scan finishes, Windows removes temporary files that are no longer required by the operating system. Running Storage Sense regularly helps prevent future buildup of unnecessary files.
Step 4: Run Disk Cleanup as an Administrator
Although Storage Sense is newer, Disk Cleanup remains one of the most reliable tools for removing stubborn temporary files.
Open the Start menu and search for Disk Cleanup.
Right-click the application and select Run as administrator. Choose the drive where Windows is installed, which is usually the C: drive.
After the scan completes, click Clean up system files.
Disk Cleanup performs another scan that includes Windows Update cleanup files, temporary installation files, delivery optimization files, thumbnails, and other system data.
Carefully review the available categories and keep anything you may still need. Once you have made your selections, click OK, followed by Delete Files.
Because Disk Cleanup runs with administrator privileges, it can remove files that the standard cleanup process may not be able to access.
Step 5: Delete Temporary Files in Safe Mode
If certain temporary files still refuse to disappear, another application or service may still be using them.
Starting Windows in Safe Mode loads only the essential drivers and services required for the operating system.
Open Settings, select System, and then choose Recovery.
Locate Advanced startup and click Restart now.
After your computer restarts, choose Troubleshoot, then Advanced options, followed by Startup Settings.
Click Restart.
When the Startup Settings screen appears, press the number corresponding to Safe Mode.
Once Windows loads, open the temporary folders using %temp% and temp again and delete their contents.
Because fewer services are running in Safe Mode, Windows can often remove files that could not be deleted during normal operation.
Restart your computer normally after completing the cleanup.
Step 6: Clear the Windows Update Cache
Sometimes Windows Update downloads files that remain stored even after updates are installed.
- Open the Run dialog by pressing Windows + R.
- Type services.msc and press Enter.
- Locate Windows Update in the list of services.
- Right-click the service and choose Stop.
- Now open File Explorer and navigate to: C:\Windows\SoftwareDistribution\Download
- Delete the files inside this folder.
- Return to the Services window.
- Right-click Windows Update again and choose Start.
This removes unnecessary update cache files that frequently occupy several gigabytes of storage.
Step 7: Repair Corrupted System Files
Sometimes corrupted Windows system files prevent cleanup operations from completing successfully.
- Open the Start menu.
- Search for Command Prompt.
- Select Run as administrator.
- Type the following command and press Enter: sfc /scannow
- Allow the scan to finish completely.
- If Windows finds damaged system files, it automatically repairs them.
- Next, enter the following command: DISM /Online /Cleanup-Image /RestoreHealth
- Press Enter.
The repair process may take some time depending on your computer’s speed and internet connection.
After both scans finish, restart your computer and try deleting temporary files again.
Repairing damaged system files often resolves cleanup problems that continue even after using every other method.
Step 8: Check Available Disk Space and Permissions
If your system drive has almost no available storage, Windows may struggle to complete cleanup operations properly.
Open File Explorer and select This PC.
Check the available space on your Windows drive.
If storage is critically low, consider moving large personal files such as videos or photos to another drive before attempting another cleanup.
Also ensure you are signed into an account with Administrator privileges. Standard accounts sometimes cannot delete protected temporary files created by Windows.
If necessary, sign in using an administrator account before repeating the cleanup process.
FAQs
Why are temporary files not deleting in Windows 11?
The most common reason is that the files are being used by running applications or Windows services. Corrupted system files, Windows Update cache, or insufficient permissions may also prevent deletion.
Is it safe to delete temporary files?
Yes. Most temporary files are designed to be removed after they are no longer needed. Windows or applications will automatically recreate necessary temporary files when required.
Why do some temporary files always remain?
Some files are actively being used by Windows while the operating system is running. These files are usually removed automatically during future restarts or updates.
Can deleting temporary files improve performance?
Yes. Removing unnecessary temporary files can free up storage space, reduce clutter, and sometimes improve system responsiveness, especially on computers with limited storage.
How often should I delete temporary files?
Cleaning temporary files once every few weeks is generally sufficient for most users. Enabling Storage Sense allows Windows to perform much of this maintenance automatically.
Does Disk Cleanup remove everything?
No. Disk Cleanup removes many unnecessary files, but some temporary files that are currently in use or protected by Windows cannot be removed until they are no longer needed.
Summary
If temporary files are not deleting completely in Windows 11 or Windows 10, the problem is usually caused by files being locked by active programs, Windows Update cache, insufficient permissions, or corrupted system files. Fortunately, resolving the issue does not require advanced troubleshooting.
Begin by closing all running applications and restarting your computer. Next, manually remove files from the %temp% and temp folders, then run Storage Sense and Disk Cleanup with administrator privileges. If stubborn files remain, use Safe Mode, clear the Windows Update cache, and repair Windows using SFC and DISM commands. Finally, verify that you have enough free disk space and administrator permissions.
Following these steps will help you safely remove unnecessary temporary files, recover storage space, and keep your Windows 11 or Windows 10 computer running more efficiently over time.
