Delete emails before a date

311 views
Skip to first unread message

Nicolas Mirek

unread,
Jan 23, 2023, 5:46:53 AM1/23/23
to GAM for Google Workspace
Hi,

I am trying to delete all emails before a date for a specific user but when I launch the command I only got 1 email. Is there an option like "maxtotrash" to add to the line for deleting instead of trashing ?

Regards.

Jay Lee

unread,
Jan 23, 2023, 6:00:09 AM1/23/23
to google-ap...@googlegroups.com
Show the command you ran.

--
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 on the web visit https://groups.google.com/d/msgid/google-apps-manager/fbf61147-036a-464d-af65-976c7762c7e5n%40googlegroups.com.

Nicolas Mirek

unread,
Jan 23, 2023, 6:09:52 AM1/23/23
to GAM for Google Workspace
gam user <user> delete messages query "before:2018-01-01"
and just got 1 message
if I run gam user <user> trash messages query "before:2018-01-01" maxtotrash 10000
I got 6981 messages.

Regards
Message has been deleted
Message has been deleted

Niranchana K

unread,
Jan 30, 2023, 11:58:12 AM1/30/23
to google-ap...@googlegroups.com
The below command is working,

gam user <user_mail_id> delete messages query "before:2023-01-31" maxtodelete 10000 doit



On Wed, Jan 25, 2023 at 10:24 PM 'Nicolas Mirek' via GAM for Google Workspace <google-ap...@googlegroups.com> wrote:
Hi, sorry to up this thread but I really need help on this :)

This Message is for testing purpose.

Nicolas Mirek

unread,
Feb 10, 2023, 5:56:44 AM2/10/23
to google-ap...@googlegroups.com
Thank you !

You received this message because you are subscribed to a topic in the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/DotGxC-_Yck/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CAFPJJNxJxozEQaRUa8X_OaUpTCYFaBSX%3DkqumkYQfwP1OBXkpA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages