MongoDB 8 · Backup and administration

Drop the current database

Delete the current database.

db.dropDatabase()

Caution: Permanently deletes every collection in the current database. Check which database you are on with db.

Official MongoDB 8 documentation

More backup and administration commands

All backup and administration commands · MongoDB 8 cheatsheet

Was this page helpful?