Mass Deletion of all Emails

57 views
Skip to first unread message

Leo Flores

unread,
May 6, 2025, 2:45:29 PM5/6/25
to GAM for Google Workspace
Hi Team,

We're currently working on deleting emails from our organization dated before 2022.

I have a command that pulls from a CSV containing the list of users whose emails need to be deleted—approximately 3000 users in total. I’m currently testing with a `maxtodelete` value of 1,000, but I’d like to increase it to around 10,000. Before doing so, I wanted to check if there are any known limitations or potential issues with setting it that high.

Also, would it be beneficial to add a multiprocessing flag or approach to improve performance and ensure the process runs smoothly?

Here’s the command I’m testing:


gam csv ./emailtest1.csv gam user ~primaryEmail delete messages query "before:2022-01-01" maxtodelete 1000 doit


Thanks!

Ian Crew

unread,
May 6, 2025, 11:20:14 PM5/6/25
to google-ap...@googlegroups.com
This might be easier and a lot faster  to do with a Vault retention rule that would purge the emails prior to a specific date (or ongoing, once they get to be > 4 years old., maybe?)

See 

Asking Gemini or Perplexity for “How do I use Google vault retention rules to delete all emails prior to 2022?” appears to give a pretty good set of step-by-step instructions, but I haven’t verified that they’re fully correct, so I’m not including them here. This is DEFINITELY a time you want to triple-check everything. 

Hope that helps,

Ian


--
Ian Crew

Architect, Communication and Collaboration Services
Productivity & Collaboration Services
Berkeley IT
University of California, Berkeley


This email and any files transmitted with it are for the use of the intended recipient(s) only. If you have received this email in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not keep, use, disclose, copy or distribute this email and any files transmitted with it without the sender's prior written permission. The information contained in this communication is confidential and proprietary information of Beyond Finance, LLC. and its Affiliates. 

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-apps-manager/f01eaa64-0722-4728-868a-4d6cc21fd00dn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages