Temporary files in Windows
Temporary files are files that Windows and programs create while they work, such as unpacked installers, caches and intermediate data. The main locations are the user folder %TEMP% (C:\Users\<name>\AppData\Local\Temp) and C:\Windows\Temp. Most of them can be deleted safely once the program that created them has closed.
1Why they pile up
Programs are supposed to delete their temporary files, but crashes, interrupted installs and updates often leave them behind. Over months the folders can grow to several gigabytes.
2What Windows offers
Settings > System > Storage > Temporary files lists categories such as Temporary files, Windows Update Cleanup, Delivery Optimization files, Recycle Bin and Downloads with their sizes. Storage Sense can remove temporary files automatically.
Downloads and Recycle Bin also appear in that list: they contain your own files, so check them before ticking.
3Files in use
Files that a running program still uses cannot be deleted; Windows skips them. This is normal and does not mean the cleanup failed.
How to clean temporary files
- Close open programs.
- Open Settings > System > Storage > Temporary files.
- Tick 'Temporary files' and other categories you understand; leave 'Downloads' unticked unless you checked it.
- Select 'Remove files'.
- Optional: press Win+R, type %temp% and delete the remaining files manually; skip the ones that are in use.
Cautions
- Do not delete the Temp folders themselves, only their content.
- Check the Recycle Bin before you empty it: items removed from it are gone.
Related articles
- Storage SenseWhat Storage Sense does in Windows 10 and 11, which files it removes, and how to configure it safely.
- Windows.old folderWhat the Windows.old folder is, why it appears after an upgrade, how long Windows keeps it and how to remove it safely.
- WinSxS folder (component store)What C:\Windows\WinSxS is, why Explorer overstates its size, and how to shrink it only with supported DISM commands.
Sources
- Free up drive space in Windows (Microsoft Support) support.microsoft.com
- Manage drive space with Storage Sense (Microsoft Support) support.microsoft.com
Note: Rain Cleaner shows each temporary-file category with its size and reason before cleaning.
Last reviewed: