The easiest way to schedule disk cleanup in Windows 11 and 10 is Storage Sense: open Settings > System > Storage > Storage Sense, turn on Automatic User content cleanup and choose to run it every day, week or month, or only when free space is low. If you want the classic Disk Cleanup categories on a timer instead, save your choices with cleanmgr /sageset:1 and run cleanmgr /sagerun:1 from Task Scheduler. Both clear temporary files automatically; neither looks for duplicates or huge forgotten files.
This guide walks through both methods, the settings that matter, and how often a scheduled cleanup should run.
Option 1: Schedule cleanup with Storage Sense
Storage Sense is built into Windows 10 and 11 and needs no scripts. It is the right choice for most home PCs.
- Press Windows + I and go to System > Storage.
- Click Storage Sense (in Windows 10, click Configure Storage Sense or run it now).
- Make sure Cleanup of temporary files is ticked.
- Turn on Automatic User content cleanup.
- Under Run Storage Sense, choose Every day, Every week, Every month or During low free disk space.
- Set Delete files in my recycle bin if they have been there for over to 30 or 60 days.
- Leave Delete files in my Downloads folder on Never unless you are sure nothing important lives there.
- Click Run Storage Sense now once to check it works.
The Downloads and Recycle Bin timers delete files permanently, with no confirmation. A 30-day Recycle Bin limit still gives you a month to recover mistakes; a 1-day limit does not.
If Storage Sense is switched on but files are not disappearing, the cause is usually a timer set to Never or a setting locked by your organization. Our guide to Storage Sense not deleting files covers each case.
Option 2: Schedule Disk Cleanup with Task Scheduler
Disk Cleanup has no schedule of its own, but it supports saved profiles. You choose the categories once, save them under a number, then tell Task Scheduler to run that profile.
Save your cleanup choices
- Right-click Start and open Terminal (Admin) or an administrator Command Prompt. Running as administrator is what makes system categories such as Windows Update Cleanup available.
- Type
cleanmgr /sageset:1and press Enter. - Tick the categories you want cleaned every time, for example Temporary files, Temporary Internet Files, Delivery Optimization Files, Windows Update Cleanup and Thumbnails.
- Leave Downloads and Recycle Bin unticked unless you really want them emptied automatically.
- Click OK. Nothing is deleted yet; the choices are saved under profile 1.
You can save other profiles with different numbers, for example /sageset:2 for a heavier quarterly cleanup.
Create the scheduled task
- Open Start, type Task Scheduler and open it.
- Click Create Basic Task in the right pane and name it, for example "Monthly Disk Cleanup".
- Choose a trigger: Monthly or Weekly, then pick a day and a time when the PC is usually on.
- For the action, choose Start a program.
- In Program/script, enter
cleanmgr.exe. In Add arguments, enter/sagerun:1. - Tick Open the Properties dialog before clicking Finish.
- On the General tab, tick Run with highest privileges so system categories are included, then click OK.
To test it, right-click the task in Task Scheduler Library and choose Run. A Disk Cleanup progress window appears and closes when done. If the PC is often off at the scheduled time, open the task's Settings tab and tick Run task as soon as possible after a scheduled start is missed.
Windows Update Cleanup can take a long time. If your scheduled run seems to stall, see Disk Cleanup not working in Windows 11.
Storage Sense or Task Scheduler?
| Storage Sense | cleanmgr in Task Scheduler | |
|---|---|---|
| Setup effort | A few clicks | Command line plus a scheduled task |
| Runs when space is low | Yes | No, fixed schedule only |
| Windows Update Cleanup | Not guaranteed; use the Temporary files page by hand | Yes, if run with highest privileges |
| Recycle Bin by age | Yes, 1 to 60 days | All or nothing |
| Report of what was removed | No | No |
| Undo | No | No |
Many people use both: Storage Sense for frequent light upkeep, and a monthly or quarterly cleanmgr profile for update leftovers. The differences between the two tools are covered in more depth in Disk Cleanup vs Storage Sense.
How often should a scheduled cleanup run?
- Most home PCs: monthly is plenty. Temporary files rarely grow fast enough to matter within a month.
- Small SSDs (128 GB or 256 GB): weekly, or Storage Sense set to run during low free disk space.
- PCs that download a lot, such as gaming or video editing machines: weekly.
- Shared family or office PCs: weekly, because several people generate temporary files and nobody remembers to clean up.
Running cleanup every day does little harm, but it also gains little. Some caches, such as thumbnails, are rebuilt straight away, so clearing them too often just makes Windows redo the work.
What a scheduled cleanup will not catch
Both built-in schedules only handle temporary and system files, which usually amount to a few gigabytes. They do not look at your own files, so a drive can still fill up with:
- The same photos and videos saved in several folders.
- Old installers, ISO files and archives in Downloads.
- Large videos and screen recordings you have forgotten about.
For that, Drive Sweeper offers scheduled sweeps of its own. You can run a sweep every week or month, get a notice when a drive is getting full, and add folders you never want touched, such as work projects or photo archives, to an exclusion list. The sweep sorts everything into duplicates, huge files, old downloads, empty folders and temporary junk, labels each item safe, review or keep, and keeps removed files in a restore area for 30 days. It also produces before-and-after reports, so you can see how much each cleanup freed and how quickly your drives are filling.
A sensible automatic setup
- Turn on Storage Sense, running monthly or during low free disk space, with the Recycle Bin limit at 30 days and Downloads on Never.
- Add a monthly Task Scheduler job that runs a cleanmgr profile including Windows Update Cleanup, if you want update leftovers handled too.
- Set up a low space alert so you hear about problems before Windows does. See low disk space warning in Windows 11 for what the built-in warning means.
- Every few months, or on a schedule with a dedicated tool, review duplicates and large files by hand.
Set it up once and your drive stays tidy without you having to remember anything.
Frequently asked questions
Can Storage Sense run on a schedule?
Yes. In Storage Sense settings you can run it every day, every week, every month or only when free disk space is low.
What do cleanmgr sageset and sagerun do?
cleanmgr /sageset:1 saves a set of Disk Cleanup choices under the number 1, and cleanmgr /sagerun:1 runs those choices without asking, which makes it suitable for Task Scheduler.
How often should I clean up my disk?
Once a month suits most home PCs. A small SSD or a PC that downloads a lot may benefit from a weekly cleanup.
