When you run meteor reset , then the meteor recursively deletes all files and files from: .meteor/local .
# source : meteor/tools/commands.js (line 806-807) ... var localDir = path.join(options.appDir, '.meteor', 'local'); files.rm_recursive(localDir); ...
I understand that you want to delete specific collections from a database stored in MongoDB. There are several ways to do this:
Remove collections from mongo shell or shell
Write a script that iterates over the names of the collections you want to delete, and then run db.getCollection(name).drop() on each of them.
From cmd: mongo [database] --eval "db.getCollection ([collectionName]). Drop ();"
or from mongo shell:
db.getCollection([collectionName]).drop();
Delete collections from MongoDB using Robomongo
This is a simple method: click and delete.
Useful note if you can connect to the mongo server using ssh:
If you have SSH access to the server where mongo is located, you can tunnel the remote port Y to local port X, so mongo will be available locally on port X:
ssh -L27018:localhost:27017 user@host
Then in Robomongo you create a connection with localhost: 27018 and you have access to the remote db.
Delete collections directly from the Meteor app.
if(Meteor.isServer){ Collection.remove({}) }
One of my production applications deletes some collections when deploying a new version:
if(Meteor.isServer){ Meteor.startup(function(){ if(cleanDB){ CollectionA.remove({}); CollectionB.remove({}); CollectionC.remove({}); } }) }
source share