How to empty Recycle Bin while signing out on Windows 10

Empty Recycle Bin is one task, we often forget until it occupies too much space. However, using a few tweaks, you can let forgo this condition and set your Recycle Bin to clean stored junk files automatically. Most of the time, we believe that there are some important files lying there in a dormant phase and that’s why we don’t take the necessary action.

The reality is in fact, different. We delete only those files which seem to be not much important. The reason behind not permanently deleting them is that we fear the deletion of key files or folders. Anyways, if you do feel cleaning Recycle bin a boring task, here we bring a simple trick that will empty Recycle bin while signing out on Windows 10.

How to empty Recycle Bin while signing out

You can follow two different methods to Empty Recycle Bin (as described below). Let’s explore them in detail-

Note: To perform this task, first of all, login into your PC with the administrator account. If you are currently using a local account, change the administrator account.

1. Using PowerShell command in Text Document

You have to create a script using PowerShell to empty Recycle Bin while signing out or turning off your PC. The script will make sure to delete all the items in recycle bin automatically. Here is the stepwise procedure-

  • Right-click anywhere on the blank area of Desktop and select the New option on the context menu.
  • Again select Text document on the pop-up sub-menu to let open a new text document.
  • Here, copy and paste the following code inside.
PowerShell.exe -NoProfile -Command Clear-RecycleBin -Confirm:$false
  • Henceforth, hit the file tab (at the top left corner) and select Save As option. Succeeding after, put its name followed by.bat extension. For example- recycle bin.bat, here recycle bin is the file’s name and .bat denotes extension.
  • This is it. However, there is still a catch here. You have to run this newly created .bat file to empty Recycle bin.

Note: This procedure will work only on Windows 10 pro, So, if you running some different operating system, try the next workaround.

2. Using Group Policy Editor

As we mention, the above method has its own limitations whether it be running the file each time to clean junk files or OS specification. Here comes Group Policy editor using which you can automate the whole process. Here is how to configure GPE settings.

  • Firstly, Press the Windows key and R hotkey together to launch the Run dialog box.
  • Now type gpedit.msc at the blinking cursor, hit OK to go ahead.
  • Once Group Policy Editor (or Edit Group Policy) comes in view, navigate to the following path-
Computer Configuration > Windows Settings > Scripts > Shutdown


empty recycle bin

  • Again make a right-click on the shutdown option, thereafter choose Add button.
  • Here tap the browse option and choose the newly created script (mentioned in the above method).
  • At last, press Enter to save the changes made so far.
  • This is it, the script is now set to turning off activity on your System. The moment you restart your computer, the script will run automatically and empty the same.

Note: If you have recently deleted some important files, make sure to visit Recycle bin before rebooting your PC, or else, the files will be permanently deleted and thus you can’t access them again.

In case, you have already enabled this and want to turn off this feature, then open GPE and remove the script.

Wrapping…

The 2 methods explained above are tried and tasted. However, if you face any issue while following as explained above, do share your trouble in the comment box.

Soni Aryan

Soni Aryan

Soni Kumari is a tech enthusiast known for her expertise in how-to type topics and Windows troubleshooting articles. She loves exploring how to do things or tweaks in Android, iPhone, and other operating systems.