How do I drop a MongoDB database from the command line?
What’s the easiest way to do this from my bash prompt? 2Best Answer 21 Like this: mongo <dbname> –eval “db.dropDatabase()” More info on scripting the shell from the command line here: https://docs.mongodb.com/manual/tutorial/write-scripts-for-the-mongo-shell/#scripting