15

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.

4

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).

  • 1
    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 '10 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). – Alberto Martinez Nov 8 '10 at 0:44
  • 2
    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 '14 at 13:52
  • This question had its last activity 2 years ago, has this changed in the meantime? – Fabian Röling Nov 7 '17 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. – Mateusz Konieczny Oct 26 '18 at 11:21
2

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

1

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.

  • 8
    Asker is specifically looking for a way to do this automatically with filters. – ale Jul 7 '15 at 16:27
1

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 at 8:28
-1

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, privacy policy and cookie policy

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