mongodb delete all documents
snippet in c

mongodb delete all documents

user7608

# To remove all documents in a collection, call the remove method with an empty query
# document {}. The following operation deletes all documents from the bios collection:

db.bios.remove( { } )

mongodb delete all documents

user5380

db.collection.delete_many( { } );