how to remove db in mongodb code example Example 1: mongodb drop db db.dropDatabase() Example 2: drop mongodb database db.dropDatabase()