Docs Menu

Docs HomeDevelop ApplicationsMongoDB 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 →