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.
Behavior
Indexes
Delete operations do not drop indexes, even if deleting all documents from a collection.
Atomicity
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.
Write Acknowledgement
With write concerns, you can specify the level of acknowledgment requested from MongoDB for write operations. For details, see Write Concern.