In this blog post i am going to explain how to delete MongoDB document. The are few ways which are illustrated below :

If we execute remove on collection without any params then it will delete all records

Drop is used to delete a collection and it’s indexes as well.

We can also delete selective document based on condition. Following examples illustrate the same :

We can also use other operators for deleting documents which are explained as follows :

You can find other post in MongoDB series at this link