How to empty Recycle Bin when shutting down your PC

Reading time icon 3 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more

empty Recycle Bin shut down PC

Emptying the Recycle Bin is like eating junk food. We don’t really pay attention to the process until it takes too much space. Luckily, you can get rid of the Recycle Bin junk with just a few clicks, which isn’t exactly the case with weight loss, though.

But why even bother and not eliminate the effort at all?

If you’re like me, emptying the Recycle Bin is not even in the back of your mind. In fact, I’m almost positive you’d be surprised what treasures your Recycle Bin hides if you open it right now.

But there’s a little trick that will make you forget about the Recycle Bin forever. Yes, you can set your Recycle Bin to empty automatically when you shut down your computer. And here’s how:

How to empty Recycle Bin automatically in Windows 10

All you need to do to make the Recycle Bin empty on every shutdown is to create a script that which automate this task. But before we start, keep in mind that doing this is only possible in Windows 10 Pro, because the Group Policy Editor is involved in the procedure.

On top of that, you’ll also need to be logged in with an administrator account.

If you meet all the ‘pre-requisites’, let’s carry one with the task. Here’s what you need to do:

  1. Right-click Desktop, go to New > Text document. 
  2. Paste the following command in the document: PowerShell.exe -NoProfile -Command Clear-RecycleBin -Confirm:$false
  3. Now, go to File > Save As, and name it by choice, but also add the .bat extention (example: empty recycle bin.bat).

That’s it for the script. Now, every time you run this file, it will empty the Recycle Bin. However, it still won’t do it automatically, as you’ll have to open it every time.

That’s where the Group Policy Editor comes into play to automate the task. Here’s what you need to do:

  1. Go to search, type gpedit.msc, and open Group Policy Editor (or Edit Group Policy).
  2. Browse the Group Policy Editor to the following location: Computer Configuration > Windows Settings > Scripts > Shutdown
  3. In the Shutdown Properties window click Add.
  4. Now, go to browse, and select the script you just created.
  5. Save the changes.

That’s about it, the script is ready and set, and now every time you reboot your computer it will empty the Recycle Bin automatically. You won’t have to worry about the Recycle Bin ever again.

Just keep in mind to make sure you don’t delete any important documents or files, because they’ll be lost forever when you restart your computer.

If you want to remove this functionality, just head back to the Group Policy Editor and remove the delete the script.

RELATED STORIES YOU NEED TO CHECK OUT:

More about the topics: All the Windows 10 tips you need to Know, Recycle Bin, Windows 10 Guides

User forum

0 messages