Skip to content

Instantly share code, notes, and snippets.

@cbrammer
Created November 16, 2012 17:05
Show Gist options
  • Save cbrammer/4089026 to your computer and use it in GitHub Desktop.
Save cbrammer/4089026 to your computer and use it in GitHub Desktop.
Drop all mongo dbs
var dbs = db.getMongo().getDBNames()
for(var i in dbs){
db = db.getMongo().getDB( dbs[i] );
print( "dropping db " + db.getName() );
db.dropDatabase();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment