How to Automatically Clean the Temp Folder in Windows 10
Windows has, for the longest time, had a folder called Temp. You can guess from the name of the folder that it holds temporary files. These files can build up over time and up until recently, you had to manually clean them. Some apps that save files to the Temp folder may delete the ones it saved however they’re rare. The Temp folder can end up taking quite a bit of space but if you’re on Windows 10 (April 2018 Update or later) or Windows 11, you can automatically clean the Temp folder with Storage Sense.
Clean the Temp folder
Windows can clean the Temp folder automatically. Open the Settings app and go to System > Storage. Turn on Storage Sense, then click Storage Sense (or Configure Storage Sense) to choose exactly what gets cleaned and how often. On this screen you can tell Windows to delete Temporary files, set when to empty the Recycle Bin and (optionally) the Downloads folder, and manage locally cached OneDrive files so they become online-only after a period of inactivity.
On the configuration screen, make sure Temporary files cleanup is enabled. You can also set how often the Recycle Bin and Downloads are cleaned (for example, remove files after they’ve been there or unused for a set number of days). In Windows 11, you’ll also see an option to make inactive OneDrive files online-only after a chosen time; starting in Windows 11 version 22H2 the default is 30 days, and items marked “Always keep on this device” are never removed.
The schedule for deleting temporary files follows your Storage Sense run frequency. You can choose to run it on a schedule or only when the device is low on disk space. If you prefer to review what’s being removed each time, use System > Storage > Cleanup recommendations for a guided, one-click review of Temporary files, Large or unused files, Files synced to the cloud, and Unused apps.
Up until Microsoft added Storage Sense to Windows 10, the Temp folder had to be cleaned manually. You can still do it: close your apps, press Win+R, type %TEMP% and delete what you can; files in use will be skipped. For system-wide items, see Settings > System > Storage > Temporary files or run cleanmgr.exe (Disk Cleanup) to remove previous Windows installations and other system files.
Temporary files aren’t synonymous with useless files. Apps that create and store them on your system often need to use these files for a short time. If you have Storage Sense cleaning too aggressively and an app starts acting up, relax the schedule or exclude Downloads/OneDrive cleanup. Two weeks is a reasonable starting point for many users, but adjust based on your workload. For hands-off cleanup without surprises, prefer Storage Sense over third-party cleaners. Microsoft Support
FAQ’S
Press Win+R, type %TEMP%, and press Enter. This opens your user Temp folder. You can safely delete files not in use; Windows will skip any files currently needed by apps.
Storage Sense runs automatically on a schedule you choose and can manage Temp files, Recycle Bin, Downloads, and locally cached cloud files. Cleanup recommendations is a manual review tool that suggests items to remove across several categories.
Storage Sense can make inactive cloud files online-only after a period you set; it does not permanently delete your cloud files, and items marked “Always keep on this device” are excluded. Microsoft Support
References
- Microsoft Support — Manage drive space with Storage Sense (Windows 10/11): setup, scheduling, Temp/Recycle Bin/Downloads, OneDrive online-only defaults.
- Microsoft Support — Free up drive space in Windows: Cleanup recommendations path and categories.
- Microsoft Support — Storage settings in Windows: overview of Cleanup recommendations and advanced storage settings.
- Microsoft Support — Manage drive space with Storage Sense: removing Previous Windows installation(s) via Temporary files.
- Lifewire — manual deletion notes and %TEMP% approach (for users who prefer manual cleanup).
What’s New in This Update
- Updated the feature name and steps to reflect Storage Sense in Windows 10/11, with current Settings paths.
- Added guidance for Cleanup recommendations (Windows 10/11) to review and remove space-hogging items manually.
- Explained how OneDrive files can become online-only under Storage Sense and noted the Windows 11 22H2 default behavior.
- Clarified safe manual cleanup using
%TEMP%and where to remove Previous Windows installation(s) via Temporary files. - Refreshed FAQs to cover differences between Storage Sense and Cleanup recommendations, and OneDrive behavior.
Last updated: 2025-10-09