Google Apps Manager (GAM) – delete email from all Google mailboxes in your domain

If you get a request to delete an email from a large number of user mailboxes or all Google mailboxes, you can run the following commands. This is useful as well when you need to remove existing SPAM from mailboxes.



Delete emails from a specific sender:

gam all users delete messages query “” maxtomodify 100 doit



Delete email threads from a specific server:

gam all users delete threads query “” maxtodelete 100 doit