MongoDB 8 · Backup and administration

Drop a collection

Delete a collection and its indexes.

db.users.drop()

Caution: Permanently deletes the collection. Back it up first.

Official MongoDB 8 documentation

More backup and administration commands

All backup and administration commands · MongoDB 8 cheatsheet

Was this page helpful?