Where Windows 10 stores temporary files and why clearing them helps
Windows 10 creates temporary files in several locations on your computer. The main folder is C:\Users\[Your Username]\AppData\Local\Temp, where programs store data they need only while running. Windows also keeps temporary files in C:\Windows\Temp for system operations. Over time, these folders accumulate files that programs no longer need, taking up disk space and sometimes slowing down your system.
Clearing temporary files frees up storage space, can improve performance if your drive is nearly full, and removes files that might interfere with program updates or installations. Most temporary files are safe to delete because they are meant to be temporary — programs recreate them if needed. However, you should close all open programs before clearing these folders, since active programs may be using files in the Temp directory.
Key Takeaways
- The Temp folder at C:\Users\[Your Username]\AppData\Local\Temp is the primary location for temporary files and is safe to empty regularly.
- You can delete temporary files manually by opening File Explorer and navigating to the Temp folder, then selecting all files and pressing Delete.
- Windows 10's built-in Disk Cleanup tool removes temporary files automatically and is accessible through Settings > System > Storage > Temporary files.
- Some temporary files may be locked by running programs, so closing all applications before deletion prevents errors and ensures complete cleanup.
- Clearing temporary files typically frees up between 100 MB and several GB, depending on how long it has been since your last cleanup.
Using Disk Cleanup for automatic temporary file removal
The easiest method is Windows 10's built-in Disk Cleanup tool, which identifies and removes temporary files without requiring manual navigation. Open Settings by pressing Windows key + I, then go to System > Storage > Temporary files. Windows will scan your drive and show you how much space temporary files are using.
Click the checkbox next to Temporary files to select them, then click Remove files. Windows will delete the selected temporary files immediately. This method is safer than manual deletion because Disk Cleanup only targets files it recognizes as safe to remove, and it handles locked files more gracefully than manual deletion.
Manually clearing the Temp folder through File Explorer
If you prefer direct control, you can navigate to the Temp folder yourself. Open File Explorer and paste this path into the address bar: C:\Users\[Your Username]\AppData\Local\Temp (replace [Your Username] with your actual Windows username). If the AppData folder is hidden, click the View tab at the top and check Hidden items to make it visible.
Once you are in the Temp folder, press Ctrl + A to select all files, then press Delete. Windows will move them to the Recycle Bin. Some files may not delete if they are currently in use by a running program — Windows will skip these and continue with the rest. Empty your Recycle Bin afterward to permanently remove the files and recover the disk space.
Clearing the Windows system Temp folder
Windows also maintains a separate temporary folder at C:\Windows\Temp for system-level operations. This folder is less critical to clear regularly, but you can empty it using the same method: navigate to the path, select all files with Ctrl + A, and press Delete. Again, some files may be locked by system processes and will not delete — this is normal and does not indicate a problem.
If you want to clear this folder more thoroughly, you can restart your computer in Safe Mode, which loads only essential Windows services and leaves most system files unlocked. After restarting in Safe Mode, navigate to C:\Windows\Temp and delete the files. This approach is optional and only necessary if you suspect locked files are preventing cleanup.
Using Command Prompt for faster batch deletion
Advanced users can clear temporary files through Command Prompt, which is faster for large folders. Press Windows key + R, type cmd, and press Enter. In the Command Prompt window, type this command and press Enter: del /q /f /s %temp%\*. This command deletes all files in your user Temp folder without prompting for confirmation.
For the Windows system Temp folder, open Command Prompt as Administrator (right-click Command Prompt and select Run as administrator), then type: del /q /f /s C:\Windows\Temp\*. The /q flag suppresses confirmation prompts, /f forces deletion of read-only files, and /s includes all subfolders. Files that are locked by running processes will be skipped automatically.
Scheduling regular temporary file cleanup
You can set up Windows to clear temporary files automatically on a schedule. Open Task Scheduler by pressing Windows key + R, typing taskschd.msc, and pressing Enter. In the left panel, navigate to Task Scheduler Library > Microsoft > Windows > Disk Cleanup. Right-click the SilentCleanup task and select Properties to view or modify when it runs.
By default, SilentCleanup runs when your disk is running low on space or on a weekly schedule. You can also create a custom scheduled task that runs Disk Cleanup at a specific time each week. This approach means you do not have to remember to clear temporary files manually — Windows handles it in the background.
What to do if files will not delete
If you see error messages saying files are in use or locked, this means a running program is currently accessing them. Close all open programs, including background applications, and try again. Check the system tray (bottom right of your taskbar) for programs running in the background — right-click them and close them if possible.
If errors persist after closing all visible programs, restart your computer and immediately open File Explorer to delete the files before other programs start. Alternatively, use the Disk Cleanup tool, which is designed to handle locked files more gracefully. You do not need to force-delete locked files — leaving them does not harm your system, and they will eventually be cleaned up automatically.
Frequently Asked Questions
How much disk space will clearing temporary files free up?
The amount varies widely depending on how long it has been since your last cleanup and how much you use your computer. Most users recover between 100 MB and 1 GB. Heavy users or those who have not cleaned in months might see several gigabytes freed. You can check the exact amount before deleting by opening Disk Cleanup and looking at the size shown next to Temporary files.
Is it safe to delete all files in the Temp folder?
Yes, it is safe to delete all files in the Temp folder. By definition, temporary files are meant to be deleted. Programs will recreate any temporary files they need the next time they run. The only exception is if a program is actively using a file in that moment — Windows will prevent deletion of those files automatically.
Will clearing temporary files speed up my computer?
Clearing temporary files will improve performance only if your disk is nearly full or very fragmented. If you have plenty of free disk space, you will not notice a speed difference. However, clearing temporary files can help if you are experiencing slow startup times or program installation failures, since some of these issues are caused by corrupted temporary files.
How often should I clear temporary files?
Most users benefit from clearing temporary files monthly or when they notice their disk is getting full. If you use your computer heavily or install programs frequently, clearing every two weeks is reasonable. You can also let Windows handle it automatically through the SilentCleanup task, which runs when disk space is low.
Can I delete files in AppData\Local\Temp while programs are running?
You can attempt to delete them, but Windows will skip any files that are currently in use. It is safer to close all programs first, which ensures that all temporary files are unlocked and can be deleted completely. This takes only a few minutes and prevents error messages.