xxxxxxxxxx
#delete all the items of a given collection
db.campaigns.deleteMany({})
xxxxxxxxxx
# 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( { } )
xxxxxxxxxx
use <whichever database>
db.getCollectionNames().forEach(function(c) { if (c.indexOf("system.") == -1) db[c].drop(); })