Bulk delete Shared Drives

113 views
Skip to first unread message

Kevin Rice

unread,
Jun 15, 2023, 3:28:46 PM6/15/23
to GAM for Google Workspace
Hi all, I have over 25,000 shared drives in our org and I'd like to delete about 11,000 of them. I used to have a link for this process but can no longer find it.
What is the best method to delete a ton of shared drives via CSV?

Thanks.

Ross Scroggs

unread,
Jun 15, 2023, 4:19:40 PM6/15/23
to google-ap...@googlegroups.com
Kevin,

Advanced GAM solution:

The CSV file (SharedDriveIDs.csv) should have a column id; (there can be others but they will not be used)

gam redirect stdout ./DeleteSharedDrives.txt multiprocess redirect stderr stdout csv ./SharedDriveIDs.csv gam delete teamdrive "~id" allowitemdeletion


Ross


--
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/33eb293c-f802-478f-84f9-4ec92682b03fn%40googlegroups.com.


--

Kevin Rice

unread,
Jun 15, 2023, 5:19:29 PM6/15/23
to GAM for Google Workspace
Great, thanks Ross I'll give this a shot.

Kevin Rice

unread,
Jun 16, 2023, 11:57:15 AM6/16/23
to GAM for Google Workspace
Hey Ross, I'm getting the error "ERROR: Extra Arguments >>>>>allowitemdeletion<<<<<<" when running the command. Have tried different variations.

Ross Scroggs

unread,
Jun 16, 2023, 12:15:45 PM6/16/23
to google-ap...@googlegroups.com
Kevin,

What is: gam version

allowitemdeletion was introduced in 6.21.00, current is 6.60.11

Ross



--

Kevin Rice

unread,
Jun 16, 2023, 12:21:30 PM6/16/23
to GAM for Google Workspace
Ya that's it and after writing that I suspected that might be it and you would ask ;) Thanks again.
Reply all
Reply to author
Forward
0 new messages