MongoDB – Delete Document:

In MongoDB, deleting a document can be done through below provided methods.

Syntax:

This command will delete a single document even though the filter or condition have multiple document that may match to update.

This command will delete all documents that match the condition.

This command can delete either a single document or multiple documents that match the condition.

Example: