How To Automatically Empty the Recycle Bin in Windows 10

When you delete a file on Windows, it’s not deleted permanently from your computer (if not deleted with Shift key). It goes to the Recycle Bin instead. It is where you need to check for deleted files and folders. This functionality comes very handy when you accidentally delete a file, you can go to Recycle Bin and restore it from there.

But with time, Recycle Bin keeps filling with garbage data. And files stored in Recycle Bin take up disk space. Sometimes, you might wonder why even after deleting files from disk, free space is not increasing. It is because deleted files are piled up in Recycle Bin and don’t release the disk space.

However, you can limit the amount of disk space the Recycle Bin uses in Recycle Bin Properties. But with Windows 10, you have options for clearing this garbage automatically using Storage Sense. This tutorial shows you how to make Windows 10 empty the Recycle Bin automatically. We are going to explain two methods in this tutorial – one using Storage Sense and other one using Scheduled Tasks. Let’s start with Storage Sense.

1. Automatically Delete Recycle Bin Data using Storage Sense in Windows 10

Microsoft introduced Storage Sense in Windows 10 version 1703. You can configure Storage Sense to automatically clear garbage data like Temporary Files and Recycle Bin. Microsoft has introduced some more options to Storage Sense in newer versions of Windows 10. Let’s see how we can automate clearing the Recycle Bin data using Storage Sense. This tutorial is based on Windows 10 version 1903.

Step 1

Open Storage Sense by going 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.

Step 2

Here you can configure settings for automatically deleting garbage data from your computer. Under Run Storage Sense you can select options to decide when to run Storage Sense. You can configure it to run on a schedule or when there is low disk space in your computer.

Under Temporary Files, you can check the box to delete temporary files. Also under that you can decide when to clear the Recycle Bin files. If you select Never, this function will be disabled. You can configure as per your requirements.

Now based on the schedule your selected in Storage Sense settings, your Recycle Bin files will be cleared automatically. Let’s now discuss other method for deleting Recycle Bin files using Task Scheduler.

2. Automatically Delete Recycle Bin Files using Task Scheduler

Now, let’s see how can we automate emptying Recycle Bin using Task Scheduler. Besides Windows 10, this method can be used on older versions of Windows as well. Let’s see how to set up a scheduled task for automatically deleting Recycle Bin files.

Step 1

First, open Task Scheduler. You can simply search for ‘task scheduler‘ on Start menu and click on Task Scheduler from search results.

Task Scheduler will open. On the rightmost pane under Actions, click Create Task…

Step 2

New Task window will open. On the General tab provide a name for the task and under Security Options, check the box next to Run with highest privileges.

Step 3

Next, move to Triggers tab. Click on New… to add a triggering schedule. Now, setup the schedule when task should run. In this tutorial, we have setup the task to run every Sunday of every Week at 20:00 Hrs. You can set your own schedule here.

Step 4

Now it’s time to setup main mechanism. Click on Actions tab and click New… to create new action to be performed by task scheduler. In New Action window, select action as ‘Start a program‘. Under Settings, in Program/script box, type cmd.exe and in Add arguments (optional) field, type following command and click OK.

/c rmdir /s /q '%systemdrive%\$Recycle.Bin'

Finally click OK on Create Task window. Task will be created in Task Scheduler Library.


Above command will clear Recycle Bin folder from Windows drive (normally C drive). You can also add another action for other drives as well by replacing ‘%systemdrive%‘ by D, E, F etc drives. For example:

cmd.exe /c rmdir 'D:\$Recycle.Bin'

However, you can use following single PowerShell command to clear 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

You can see newly created task in 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 set time schedule. In case you want to clear recycle bin at any time, you can also run this task manually. Just right-click on it and select Run.

Automatically Empty Recycle Bin on a Schedule in Windows 10

Above two methods explained how you can setup your computer to automatically empty the Recycle Bin on a schedule defined by you. While Windows 10 provides native way to empty your Recycle Bin automatically via Storage Sense, the people using older versions of Windows can try Task Scheduler method for the same purpose. Hope you liked this tutorial. Drop your comments, suggestions and queries in comment section below. Enjoy, have fun.

Editorial Staff

Hi there, we are the editorial staff at HELLPC Tutorials. We are a team of funny and technical people. Feel free to get in touch with us via Contact-Us page.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to top button