Navigation

Delete Documents


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.

Give Feedback

Select your language