How to Automatically Empty the Recycle Bin in Windows 10 & 11
Recycle Bin stores the files you delete in Windows. So, you can check your accidentally deleted files in the Recycle Bin. But with time, the Recycle Bin keeps filling with garbage data. This garbage data keeps taking up space in your hard drive until you manually or automatically empty the Recycle Bin in your Windows 10 or 11.
However, you can limit the amount of disk space to be used for the Recycle Bin. But with Windows 10 and Windows 11, you have options for clearing this garbage automatically using Storage Sense. Besides Storage Sense, you can also use Task Scheduler to automatically delete recycle bin data.
SEE ALSO: How to Recover Delete Files using Windows File Recovery?
Automatically Empty Recycle Bin in Windows 11 and Windows 10
This tutorial shows you how to clear Recycle Bin data in Windows 10 or 11 automatically. We are going to explain two methods in this tutorial – one using Storage Sense and the other one using Task Scheduler. Let’s start with Storage Sense.
Method 1: Automatically Delete Recycle Bin Data using Storage Sense
Microsoft introduced Storage Sense in Windows 10 version 1703. So, we recommend you update your Windows 10 to the latest version if you are running older versions.
After updating, you can configure Storage Sense to automatically clear garbage data like Temporary Files and Recycle Bin. Let’s see how we can automate clearing the Recycle Bin data using Storage Sense. this tutorial is based on Windows 11 but will work on Windows 10 as well.
Step 1: Enable Storage Sense in Windows 11 and Windows 10
First of all, we need to turn on the Storage Sense in Windows 11 and 10. The steps are a bit different for Windows 11 and 10. So, we will show you the steps for Windows 11 and 10 separately. Let’s start with Windows 10.
Windows 10:
Go to Settings > System > Storage. At the top of the page under Storage turn ON the switch to enable Storage Sense. Next, click on Configure Storage Sense or run it now. There you can set automatic cleaning up of recycle bin.
Windows 11:
Go to Settings > System > Storage. Here scroll down to the Storage Management section and turn on the switch for Storage Sense. After that click on Storage Sense to open Storage Sense settings.
SEE ALSO: How to Enable and Configure Storage Sense in Windows 10?
Step 2: Configure Storage Sense to Automatically Empty the Recycle Bin on a Schedule
In Storage Sense settings, you can configure it to automatically delete recycle bin data from your computer. However, as mentioned above, settings for Windows 10 and 11 differ slightly. So, we will explain for both Windows 10 and 11 separately.
Windows 10:
Click the drop-down under Run Storage Sense and select Every Month to run it on a monthly basis. You can also select weekly or daily based on your requirements. After that click on the drop-down under “Delete files in my recycle bin if they have been there for over:” and select 30 days. You can also select 7, 14, etc. days based on your requirements.
Windows 11:
In Windows 11, open Storage Sense settings and scroll down to Configure cleanup schedules. Here, select Every Month to Run Storage Sense. You can also select every week or day. After that select no. of days to automatically clean recycle bin data under “Delete files in my recycle bin if they have been there for over:”.
Now based on the schedule you selected in Storage Sense settings, your recycle bin files will be cleared automatically. Let’s now discuss another method for deleting Recycle Bin files using Task Scheduler.
SEE ALSO: How to Schedule Automatic Shutdown in Windows 10 using Task Scheduler?
Method 2: Automatically Delete Recycle Bin Files using Task Scheduler
Now, let’s see how can we automate the emptying of the Recycle Bin using Task Scheduler. Besides Windows 10 and Windows 11, this method can also be used on older versions of Windows as well.
So, let’s see how to set up a scheduled task for automatically deleting Recycle Bin files. This method has exactly the same steps for Windows 10 and Windows 11, so, you don’t need to worry about the version of your Windows.
Step 1: Open Task Scheduler and click Create Task
First of all, open Task Scheduler. You can simply search for ‘task scheduler‘ on Start and click on Task Scheduler from search results.
Task Scheduler will open. On the rightmost pane under Actions, click Create Task… to create a new task.
SEE ALSO: How to Automatically Turn On Your PC on a Schedule?
Step 2: Set Task Name and Set Privileges
A new Create Task window will open. On the General tab provide a name for the task e.g. Automatically Empty Recycle Bin. After that under Security Options, check the box next to Run with highest privileges.
Step 3: Set the Schedule for Automatic Recycle Bin Cleanup
Next, move to the Triggers tab. Click on the New… button to add a triggering schedule. Now, set up the schedule according to your requirements.
In this tutorial, we have set up the “Automatically Empty Recycle Bin” task to run every Sunday of every Week at 8:00 PM. You can set your own schedule here.
Step 4: Set the Action to Automatically Clean the Recycle Bin in Windows 10 or 11
Now it’s time to set up the main mechanism. Click on the Actions tab and click New… to create a new action to automatically clean the recycle bin.
In the New Action window, select action as ‘Start a program‘. Under Settings, in the Program/script box, type cmd.exe
and in the Add arguments (optional) field, type the following command and click OK.
/c rmdir /s /q '%systemdrive%\$Recycle.Bin'
Finally, click OK to create the task and close the Create Task wizard. The task will be created in the Task Scheduler Library.
NOTE:
The command mentioned above will clear the Recycle Bin folder from the Windows drive (normally C drive) only. You can also add another action for other drives as well by replacing ‘%systemdrive%‘ with D, E, F, etc. drives. For example:
cmd.exe /c rmdir 'D:\$Recycle.Bin'
However, you can use the following single PowerShell command to clear the Recycle Bin of all disk drives.
powershell.exe /c "$(New-Object -ComObject Shell.Application).NameSpace(0xA).Items() | %%{Remove-Item $_.Path -Recurse -Confirm:$false}"
Step 5: Run the Task to Clean the Recycle Bin immediately
You can see the newly created task in the Task Scheduler Library. It will display the name, status, and triggers set for that task as shown below.
This task will automatically run at the scheduled time. In case you want to clear the recycle bin at any time, you can also run this task manually. Just right-click on it and select Run.
SEE ALSO: How to Bypass Recycle Bin and Delete Files Permanently in Windows 10?
Automatically Empty the Recycle Bin on a Schedule in Windows 11 and 10
The above tutorial explained two methods to set up your computer to automatically empty the Recycle Bin on a schedule of your choice. While Windows 10 and 11 provide native ways to empty your Recycle Bin automatically via Storage Sense, people using older versions of Windows can try the Task Scheduler method for the same purpose. You just need to make sure your Windows 10 is updated to the latest version.
Hope you liked this tutorial. Drop your comments, suggestions, and queries in the comment section below. Feel free to subscribe to our newsletter to get the latest tutorials directly into your inbox.