delete all in collection mongodb code example
Example 1: mongodb remove all from collection
db.collection.remove({})
Example 2: find All and delete in mongodb
db.products.remove( { qty: { $gt: 20 } } )
db.collection.remove({})
db.products.remove( { qty: { $gt: 20 } } )