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.

Note

Atomicity and Write Acknowledgement

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

You can also use write concerns to specify the level of acknowledgment requested from MongoDB for write operations. For more information, see Write Concern.

Back

Use MQL to Update an Array

Earn a Skill Badge

Master "CRUD Operations" for free!

Learn more

On this page