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.
Note
Atomicity and Write Acknowledgement
MongoDB write operations are atomic on the level of a single document. For more information, see Atomicity and Transactions.
You can also use write concerns to specify the level of acknowledgment requested from MongoDB for write operations. For more information, see Write Concern.