mongodb delete a database code example Example 1: mongodb drop db db.dropDatabase() Example 2: drop database mongodb command line mongo --eval "db.dropDatabase()"