/a/community?hl=en
/a/community?hl=en
7/7/09
Original Poster
juhl

bulk account delete

I would like to bulk delete last year's graduating class of Seniors out of our Google Apps for Education account. How do I do that? It seems like I have to delete users one by one? I don't want to delete all users and create brand new accounts for everyone but it seems like that is my only option other than deletion one by one (which I refuse to do because that's just silly). If I delete everyone's account and start over with a new bulk upload, then all docs, spreadsheets, presentations, etc... that were shared will be deleted as well I'm sure.
 
There has got to be a reason why Google is making this so difficult?
 
Please help! :)
Jen
Community content may not be verified or up-to-date. Learn more.
Recommended Answer
Was this answer helpful?
How can we improve it?
All Replies (24)
Jay H. Lee
7/8/09
Jay H. Lee
Hi juhl,

  It's possible to use my utility, Google Apps Manager (GAM):

http://code.google.com/p/google-apps-manager

along with some DOS prompt magic in order to bulk delete accounts.  You'll need to create a text file with all the user accounts to be deleted, one per line.  Something like:

jsmith
jdoe
mjohnson

then, with GAM installed, run the DOS command:

FOR %A IN (deletes.csv) DO gam.exe delete user %A          (replace deletes.csv with the name of the file you actually created)

this should loop through all entries of the file and run the GAM command "gam.exe delete user <username>", replacing <username> with the contents of each line.

Hope you find this useful!

Jay
jorrflv
7/14/09
jorrflv
I am having the same issue. I am on a Mac and cannot run dos commands. Can anyone else pose a solution to bulk management of accounts?
 
Jon
Jay H. Lee
7/15/09
Jay H. Lee
Jon,

  GAM is Python so it will run on Macs no problem, just grab the Python Source file and extract it.  Open up a Terminal and from the directory where you extract GAM run:

./gam.py delete user <username>

as far as the CSV goes, there should be a way to do it with the Bash command line shell I just don't know off hand but Google should help...

Jay
jorrflv
7/15/09
jorrflv
i tried running the command line in terminal and i get an error
 
library01:gam-0 orrj$ ./gam.py delete user bf5367
./gam.py: line 1: import: command not found
./gam.py: line 2: import: command not found
./gam.py: line 3: import: command not found
./gam.py: line 4: import: command not found
from: can't read /var/mail/hashlib
: command not found
./gam.py: line 7: syntax error near unexpected token `('
'/gam.py: line 7: `def showUsage():
Jay H. Lee
7/15/09
Jay H. Lee
try:

python ./gam.py delete user bf5367

Jay
18 MORE
Dave Stacey
8/31/10
Dave Stacey
Hi - I'm running GAM on a macbook running 10.5. Installed fine, I can delete users one at a time. I've created the deleteusers.csv file and typing the code as above (while IFS=, read username; do python gam.py delete user $username; done < deleteusers.csv) but nothing happens! I just get the next prompt line. I'm including the screen dump below in case it helps anyone:
 
Last login: Tue Aug 31 21:05:49 on ttys000
dave-staceys-macbook-pro:~ ds$ cd ~/gam
dave-staceys-macbook-pro:gam ds$ while IFS=, read username; do python gam.py delete user $username; done < deleteusers.csv
dave-staceys-macbook-pro:gam ds$ gam delete user 02cwedmsio
-bash: gam: command not found
dave-staceys-macbook-pro:gam ds$ alias gam="python gam.py"
dave-staceys-macbook-pro:gam ds$ gam delete user 02cwedmsio
Deleting account for 02cwedmsio
dave-staceys-macbook-pro:gam ds$ while IFS=, read username; do python gam.py delete user $username; done < deleteusers.csv
dave-staceys-macbook-pro:gam ds$ while IFS=, read username; do python gam.py delete user $username; done < deleteusers.csv
dave-staceys-macbook-pro:gam ds$
 
 
Anyone got any thoughts on how I can make this work?
Thanks in advance!
 
D
 
This question is locked and replying has been disabled. Still have questions? Ask the Help Community.

Badges

Some community members might have badges that indicate their identity or level of participation in a community.

 
Expert - Google Employee — Googler guides and community managers
 
Expert - Community Specialist — Google partners who share their expertise
 
Expert - Gold — Trusted members who are knowledgeable and active contributors
 
Expert - Platinum — Seasoned members who contribute beyond providing help through mentoring, creating content, and more
 
Expert - Alumni — Past members who are no longer active, but were previously recognized for their helpfulness
 
Expert - Silver — New members who are developing their product knowledge
Community content may not be verified or up-to-date. Learn more.

Levels

Member levels indicate a user's level of participation in a forum. The greater the participation, the higher the level. Everyone starts at level 1 and can rise to level 10. These activities can increase your level in a forum:

  • Post an answer.
  • Having your answer selected as the best answer.
  • Having your post rated as helpful.
  • Vote up a post.
  • Correctly mark a topic or post as abuse.

Having a post marked and removed as abuse will slow a user's advance in levels.

View profile in forum?

To view this member's profile, you need to leave the current Help page.

Report abuse in forum?

This comment originated in the Google Product Forum. To report abuse, you need to leave the current Help page.

Reply in forum?

This comment originated in the Google Product Forum. To reply, you need to leave the current Help page.