Vikrant
-4
Q:

drop multiple database mongo

mongo --quiet --eval 'db.getMongo().getDBNames().forEach(function(i){db.getSiblingDB(i).dropDatabase()})'
1
// if you have a list of Databases to delete then you may run the following command?


['db1', 'db2', 'db3', 'db4'].forEach(function(i){db.getSiblingDB(i).dropDatabase()})
0

New to Communities?

Join the community