Correct use of deleteMany() in MongoDB
Jul 13, 2022
If you are looking to delete all the documents in MongoDB and having an issue then use this code to delete them:
If you got results like
Now you need to check your database, hopefully, the collection is empty.