Tuesday, 18 December 2018

Deleting a single email from all mailboxes in GSuite using GAM tool

Or, How to delete a single email using GAM tool in GSuite?
Or, Delete a single email from all mailboxes in GSuite
Or, Email sent by mistake to all users, want to delete the specific email from everyone’s mailboxes

Descriptions: This is a very common scenario where someone in your organization sent an email by mistake to a ‘Distribution List’ which may contain 100-1000 or even more users. Now the role of administrator starts here.
The requirement here is to delete this particular email from every user’s mailbox without letting them know about this or without their intervention.
Take it easy, you can use below GAM command to get it done.

Prerequisite: You should have the Message ID of the email that you want to delete

Open GAM CMD with administrative privilege, and Run below command to delete the specific email
gam all users delete messages query rfc822msgid:<Message_ID> doit

gam all users delete messages query rfc822msgid:CAhshdghs79jo_J6XZimV_tywxjhshgQh2cZV-mQ@mail.gmail.com doit

Got 1 messages for user tsadmin@techiessphere.com
delete 1 messages
Got 0 messages for user tsuser@techiessphere.com
would try to delete 0 messages for user tsuser@techiessphere.com (max 1)
Here in the above result section, you can see that the email was deleted from one affected user where it was found matched, and the command skipped the second user where there was no matched content/email found.

Cheers, please write me back if you have any query or feedback on this.


  1. I am glad that i came to see this, really loved it. Thank you for sharing it. SwissMailbox is offering the Virtual Address, Handle Mail and Swiss Mailing and secure scan service Address in Switzerland in the cost effective prices.For more mailing address switzerland

  2. A very awesome blog post. We are really grateful for your blog post. You will find a lot of approaches after visiting your post. www.hotmail.com entrar

  3. A webmaster can now use this information with ease as the URL logging feature will know where the information is and pages will not have to be loaded and searched individually. email extractor from google search