Skip to content

Instantly share code, notes, and snippets.

@amccarty
Created July 13, 2016 02:58
Show Gist options
  • Save amccarty/2ff563751dceb5b62ebb451b36ba5f44 to your computer and use it in GitHub Desktop.
Save amccarty/2ff563751dceb5b62ebb451b36ba5f44 to your computer and use it in GitHub Desktop.
Drop ALL mongo DBs (no prompt, no backup, just go)
#!/bin/bash
mongo --quiet --eval 'db.getMongo().getDBNames().forEach(function(i){db.getSiblingDB(i).dropDatabase()})'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment