Empty the trash of a shared drive?

70 views
Skip to first unread message

Tyler Woods

unread,
Mar 7, 2023, 11:51:57 AM3/7/23
to GAM for Google Workspace
I've got a shared drive in my organization with so many files it is feasible to empty the trash via the web UI. Reading through the documentation I'm not seeing a way to empty the trash of a shared drive. Is this possible with GAM?

Ross Scroggs

unread,
Mar 7, 2023, 12:02:39 PM3/7/23
to google-ap...@googlegroups.com

On Tue, Mar 7, 2023 at 8:51 AM Tyler Woods <tyler...@gmail.com> wrote:
I've got a shared drive in my organization with so many files it is feasible to empty the trash via the web UI. Reading through the documentation I'm not seeing a way to empty the trash of a shared drive. Is this possible with GAM?

--
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/a8dd3f21-ada6-41a5-8948-f6cb026bf459n%40googlegroups.com.


--

Tyler Woods

unread,
Mar 7, 2023, 12:10:07 PM3/7/23
to GAM for Google Workspace
Thank you Ross. Would you know where to find what and/or where I'd find the entities mentioned in the command? Not seeing anything the documentation to define these.

Can't seem to find anywhere that tells me what the following are and where to find them: <UserTypeEntity> <SharedDriveEntity>

Ross Scroggs

unread,
Mar 7, 2023, 12:17:00 PM3/7/23
to google-ap...@googlegroups.com
Tyler,

Scroll to the top of the page, look under Definitions.

Ross



--

James SEYMOUR

unread,
Mar 7, 2023, 8:09:04 PM3/7/23
to GAM for Google Workspace
Hi Tyler,

The <UserTypeEntity> is defined on this page https://github.com/taers232c/GAMADV-XTD3/wiki/Collections-of-Users. Some examples are;-
  • user <Users Email Address>
  • ou_and_children <Path/To/Top/OU>
  • all users
The <SharedDriveEntity> is defined up the page (https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Drive-Cleanup#empty-the-trash-on-a-shared-drive) Ross linked to.

<SharedDriveEntity> ::=
        <SharedDriveID>|(teamdriveid <SharedDriveID>)|(teamdriveid:<SharedDriveID>)|
        (teamdrive <SharedDriveName>)|(teamdrive:<SharedDriveName>)

So at a basic level you just need to specify the <SharedDriveID> in the command. But you could use the Shared Drive name if you want, by specifying teamdrive <SharedDriveName>

S​o the command you need to run would look something like this;-

gam ​user drive.o...@domain.com empty drivetrash ​0A​xxxxxxxxxPVA

Cheers

James
Reply all
Reply to author
Forward
0 new messages