Q:

mongo delete all documents

# 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( { } )
3
db.bios.remove( { } )
5
db.collection.delete_many( { } );
1
db.collection.remove(
   <query>,
   {
     justOne: <boolean>,
     writeConcern: <document>
   }
)
2

New to Communities?

Join the community