When choosing to delete an email via a filter, the message is sent to the trash. Is there any way to permanently delete it instead?

I tried deleting it twice with two different filters (the logic is that if you delete a message in the trash, it should be permanently deleted), and, although the second filter is run, it doesn't permanently delete the message.

6 Answers 6


The "Delete it" command in GMail means "Move to trash" (if I recall correctly that was the exact wording some time ago), so it doesn't matter how many times you delete it, it will be kept in the trash.

And since the spirit of GMail was since the beginning "we offer you enough space so you don't need to delete any message", I don't think they are going to change it (also, it would make easier deleting emails permanently by mistake).

  • 3
    The reason I thought deleting it twice might work is because the delete button is replaced by "delete forever" when viewing the trash, so essentially you are deleting the message twice. Additionally, in Gmail's IMAP actions, it states that to delete a message permanently, you delete it when it is in the trash. I was hoping that Google implemented the same thing via filters, and so I tried deleting the message twice.
    – Senseful
    Nov 7, 2010 at 3:26
  • 2
    I think that your reasoning was good from the point of view of the web/IMAP interface, but for filters I think that make more sense the "move to trash" approach (or maybe is just my biased developer point of view). Nov 8, 2010 at 0:44
  • 6
    Storage isn't the problem. In my case it's IMAP mail clients that are the problem. If a flood of 10,000 emails has come in that have all been moved to the Trash folder by my filter, the IMAP client will still read the headers of every one of them. It creates unnecessary network and CPU use.
    – sobri
    Jul 4, 2014 at 13:52
  • This question had its last activity 2 years ago, has this changed in the meantime? Nov 7, 2017 at 10:23
  • 1
    @FabianRöling From what I see it is still true. I tried to find way to do that both via web interface and via API. Oct 26, 2018 at 11:21

Once you have the messages filtered in the trash folder, click select all box, then right click on any of the selected messages. You get a pop-up menu which contains a 'delete forever' option :))

  • This solution works!!! But works partially - once you select all the messages matching the criteria - it again disappears. But as I mentioned - it does work :)
    – Viral Jain
    Jan 14, 2019 at 8:28

I have managed to get halfway to making automatic permanent deletion possible. There's a python script on this post which logs into your account and deletes all emails in the Trash folder. Can keep polling for new emails in the Trash folder and delete them if found.

It might be useful for you


If you're using the Outlook client in combination with GMail, there's an option to automatically remove all the email from the Trash folder on the program's exit. Plus, you have still a chance to not accept it. Works great for me...


I think I've found a way to nearly do what you want.

  1. Before you start, set your view to show the maximum number of emails per page (ATMIT its 100 - do this on the General tab in Settings)
  2. Then select your Bin folder in GMail (It should say in:trash in the search box at the top)
  3. click into the search box at the end the text you want to search on. e.g. it might say in:trash facebook and press ENTER to do the filtering
  4. In the 'select' dropdown (top left ish) click select all
  5. Now click back up into the search box and delete the text of your filter but keep the in:trash and press ENTER
  6. Now any emails that you selected in step 4 above should still be selected and you can click the delete forever button. If you have more than 100 emails in your spam you'll then need to click to view the next 100 and then click delete forever again. - Repeat this step for the whole inbox. { it's not as bad as it sounds as the delete forever button is only present if the screen contains any selected items }

Now this is possibly still laborious depending on the size of your TRash folder but it is easier than manually searching by eye and individually clicking to select each email.

  • 11
    Asker is specifically looking for a way to do this automatically with filters.
    – ale
    Jul 7, 2015 at 16:27
  • @ale - this is using some filtering - see step 3 which filters on all emails contianing the phrase 'facebook' May 1, 2020 at 8:52
  • @jacanterbury Gmail's "filters" are rules that automatically filter or delete emails on receipt.
    – mbomb007
    Jan 14, 2022 at 17:38
  • @ale - google filters can be automatic or manual. Asker said 'filter' - they did not say automatic so you downmark and comment are unwarranted. Apr 12, 2022 at 9:40

Maybe it would help to mark as spam, instead of filter, so this way it never goes to Inbox or Trash.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.