Open your terminal then open MongoDB

mongo

Navigate to your database

use myDbName;

Now run the following command and change the collection keyword to collection name that you want to delete:

db.collection.remove(query, options)

To delete all documents, just pass an empty object as first argument to remove method:

db.collection.remove({})

For list of options see MongoDB Manual

mongo series1 - Run MongoDB in the background2 - Create root user in MongoDB3 - Default Config File Path4 - Create Daily Backup For MongoDB Databases5 - Default path of config file in MongoDB6 - List All Databases In MongoDB7 - Delete OR Drop Database In MongoDB8 - How to export or dump database in MongoDB9 - How Import or restore database In MongoDB10 - List all collections in database with its size11 - Delete Database Collection from database12 - Delete Database Collection documents from database
MONGODB#MONGODBterminal#terminal