Learn the "why" behind slow queries and how to fix them in our 2-Part Webinar.
Register now >
Docs Menu
Docs Home
/ /

Delete Documents

You can delete documents in MongoDB using the following methods:

  • Your programming language's driver.

  • The MongoDB Atlas UI. To learn more, see Delete a Document with Atlas.

  • MongoDB Compass.

Delete operations do not drop indexes, even if deleting all documents from a collection.

All write operations in MongoDB are atomic on the level of a single document. For more information on MongoDB and atomicity, see Atomicity and Transactions.

With write concerns, you can specify the level of acknowledgment requested from MongoDB for write operations. For details, see Write Concern.

Back

Use MQL to Update an Array

Earn a Skill Badge

Master "CRUD Operations" for free!

Learn more

On this page