mongodb/mongodb-drop-collection

Drop Collection

Remove an entire collection

mongodb
drop
collection

Command

db.users.drop()

Explanation

Removes the entire collection from the database. Useful for cleanup or resetting data.

Examples

Drop orders collection

db.orders.drop()