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
- Back up a database
- Restore a dump
- Export a collection to JSON
- Import JSON
- Check database size
- Create a user
All backup and administration commands · MongoDB 8 cheatsheet