Question - How do we delete everything from the MongoDB database?
Answer -
By using the following code, we can delete everything from the MongoDB database:
use [database];
db.dropDatabase();
Ruby code should be pretty similiar.
Also, from the command line:
mongo [Database] -eval "db.dropDatabase();"
use
[databaseName]
db.Drop+databasename();
drop colllection
use databaseName
db.collectionName.drop();