Answers for "mongodb command delete all"

3

mongodb remove all from collection

db.collection.remove({})
Posted by: Guest on December-21-2020
5

mongodb delete all documents

db.collection.delete_many( { } );
Posted by: Guest on April-20-2020
0

remove all db entries from mongo

db.users.remove({})
Posted by: Guest on June-28-2021
0

mongodb command delete all

db.collention.deleteMany() 

// db.collection.remove() id deprecated.
Posted by: Guest on March-12-2022
0

delete everything mongodb

use [database];
db.dropDatabase();
Posted by: Guest on September-13-2021

Code answers related to "mongodb command delete all"

Browse Popular Code Answers by Language