db.collection.delete_many( { } );
#delete all the items of a given collection
db.campaigns.deleteMany({})
db.bios.remove( { } )
db.users.remove({})
db.collention.deleteMany()
// db.collection.remove() id deprecated.
# 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( { } )
Removes ALL: db.<collectionName>.remove({})
Example: db.users.remove({id: 73465872012183})
db.products.remove( { qty: { $gt: 20 } } )
use [database];
db.dropDatabase();
use [database]; db.dropDatabase();