When you select a file or folder and press the Delete key on your keyboard, the file is moved to the Recycle Bin. The good thing about this approach is that you can recover the said file or folder from the Recycle Bin if you’ve deleted it accidentally or want it some other time. As good as it is, if you are not careful, the recycle bin can quickly fill up and use a lot of precious hard drive space. Sure, you can manually clean the recycle bin from time to time. However, there is a better way to do things. Follow the below steps to configure Windows to automatically empty recycle bin after 30 days.
Steps to Empty Recycle Bin Automatically in Windows 10
Windows 10 makes it quite easy to automatically empty recycle bin using the Storage Sense feature. In case you don’t know, Storage Sense lets you automatically deletes all the temporary files to free up some space. Follow the below steps to use Storage Sense to empty recycle bin.
1. Open the settings app by searching for it in the start menu.
2. In the settings app, go to “System -> Storage” page. On the right panel, toggle the switch under “Storage Sense” to the “On” position.
3. Next, click on the “Configure Storage Sense or run it now” link appearing right under the toggle switch.
4. Here, make sure that the “Delete temporary files that my apps aren’t using” checkbox is selected. Next, select “30 days” from the dropdown menu under “Delete files in my recycle bin if they have been there for over”.
6. Close the settings app.
That is it. From now on, Windows will automatically delete files inside the recycle bin that are older than 30 days. For example, if you’ve just deleted a file or folder, that will not be cleaned by the Storage Sense for the next 30 days. This gives you a chance to recover files when needed.
Steps to Automatically Empty Recycle Bin on Schedule in Windows 10, 7 & 8
If you are on Windows 7 or 8, you can use the task scheduler to empty recycle bin on schedule. Of course, Windows 10 users can follow the steps too.
1. Open the start menu, search for “Task Scheduler” and open it.
2. In the task scheduler window, click on the “Create Task” button appearing on the right panel.
3. The above action will open the Create Task window. Here, type in the task name.
4. Go to the “Triggers” tab and click on the “New” button.
5. In the Trigger window, select “On a schedule” from the dropdown menu next to “Begin the task”. Next, select “Monthly”. After that, select “On”, “First”, and “Sunday” from the dropdown menus. Click on the “Ok” button to save changes.
6. Go to the “Actions” tab and click on the “New” button.
cmd.exe in the Program/Script field. Next, copy the below command and paste it in the “Add arguments” field. Click on the “Ok” button.
/c "echo Y|PowerShell.exe -NoProfile -Command Clear-RecycleBin"
8. Click on the “Ok” button in the main window to save the changes.
9. To make sure the task is running as it should, find the task in the Task Scheduler, right-click on it and select “Run“. If everything is working fine, you should see a brief command prompt window and the recycle bin will be emptied automatically.
From now on, the task scheduler will empty the recycle bin every month on the first Sunday. If you want to run it on some other day or week, change the settings in step 5.
That is it.