Table of Contents
Use Storage Sense to clean up temporary files automatically in Windows 11. It has settings for when it runs and how long it keeps items in the Recycle Bin. Review those settings before turning it on, especially if you use the Recycle Bin to recover files.
Set up Storage Sense
- Open Settings → System → Storage → Storage Sense.
- Enable automatic cleanup and choose when it runs. On supported builds, the schedule options include running when disk space is low or at a regular interval.
- Check the Recycle Bin retention period. Leave Downloads set to Never if you keep files there.
- If Windows shows cloud-content settings, review them separately. Making a synced file online-only frees local space and means you need a connection to open it again unless you keep a local copy.
See Microsoft’s Storage Sense guide for the available settings. For a one-time cleanup, open Storage → Temporary files and inspect the categories before selecting Remove files.
Check for an older cleanup task
An earlier batch-file method used ClearTempFiles.bat and a Task Scheduler entry called Clear Temporary Files. The screenshots below help identify that setup if it is already present. A script that clears entire folders or the Recycle Bin can remove files you expected to keep.
In Task Scheduler → Task Scheduler Library, open the existing task and check its Triggers and Actions. Verify the task name and script path before changing anything.
If this is a task you created and no longer need, right-click the task and choose Disable. Check its status afterward. Older setups sometimes ran at elevated privileges, as shown here.
If the drive is still full, use the Windows storage breakdown to find large apps and files rather than expanding the cleanup to system folders.
Reader Comments 0
Sign in with email or Google to join the discussion.