Docs Menu

Docs HomeMongoDB Manual

Delete Documents

On this page

  • Delete All Documents
  • Delete All Documents that Match a Condition
  • Delete Only One Document that Matches a Condition
  • Delete Behavior

Use the Select your language drop-down menu in the upper-right to set the language of the following examples.


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 acknowledgement requested from MongoDB for write operations. For details, see Write Concern.

←  Update MethodsDelete Methods →
Give Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.