Remove user from all files shared with them

32 views
Skip to first unread message

Eric Tietze

unread,
Jun 25, 2026, 12:30:23 PM (3 days ago) Jun 25
to GAM for Google Workspace

We had a principal who passed away a couple of years ago. The Google account was suspended then archived and ownership of her files was transferred to the new principal. However, files that had been shared with her previously still show her account in the list when you go to share settings. This can be a little bit of an emotional punch for some of our staff if they see her name pop up unexpectedly like that. We don’t want to delete the account at this point but also do not want her name popping up if someone goes into a file that had been previously shared with her. Is there a simple way to do this with GAM? I have GAM but have very little experience with it.

Ross Scroggs

unread,
Jun 25, 2026, 1:01:57 PM (3 days ago) Jun 25
to google-ap...@googlegroups.com
This command will list all files shared to old...@domain.com (replace with actual value.).
Replace "all users" with "ou Staff" if those are the only users who shared (replace Staff with actual value).

gam config auto_batch_min 1 num_threads 10 redirect csv ./OldPrinShares.csv multiprocess redirect  stderr - multiprocess all users print filelist fields id,name,mimetype,basicpermissions query "'old...@domain.com' in readers or 'old...@domain.com' in writers" pm type user emailaddress old...@domain.com em pmfilter oneitemperrow


Review OldPrinShares.csv.


This command will delete the shares.


gam config num_threads 10 redirect stdout ./DeleteOldPrinShares.txt multiprocess redirect stderr stdout csv OldPrinShares.csv gam user "~Owner" delete drivefileacl "~id" "id:~~permission.id~~"


Ross


----
Ross Scroggs



On Jun 25, 2026, at 9:28 AM, Eric Tietze <eti...@jebc5.k12.mo.us> wrote:

We had a principal who passed away a couple of years ago. The Google account was suspended then archived and ownership of her files was transferred to the new principal. However, files that had been shared with her previously still show her account in the list when you go to share settings. This can be a little bit of an emotional punch for some of our staff if they see her name pop up unexpectedly like that. We don’t want to delete the account at this point but also do not want her name popping up if someone goes into a file that had been previously shared with her. Is there a simple way to do this with GAM? I have GAM but have very little experience with it.


--
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/5b1d91cf-9ca3-4c70-8699-97692ef0387dn%40googlegroups.com.

Eric Tietze

unread,
Jun 26, 2026, 6:35:01 PM (2 days ago) Jun 26
to google-ap...@googlegroups.com
Thanks for this response, I just remembered I'm working on a laptop today without GAM installed so I will have to give this a try first of next week when I'm back in the office and at my other computer.

“The principal goal of education in the schools should be creating men and women who are capable of doing new things, not simply repeating what other generations have done.” —Jean Piaget


Eric Tietze
Technology Director
Laclede County C-5 District
Joel E. Barber School

Buckskins empower each other to: BE the change, BE lifelong learners, BE productive citizens!


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/N4uIikbtTro/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-apps-manager/F6CB690C-8CAD-43A7-92A0-0C5421D59455%40gmail.com.
Reply all
Reply to author
Forward
0 new messages