mongodb/docs — pull request #2005 by gianpaj (2014-09-22 15:55:47+00:00)
Title: mongoimport --drop does not drop all the collections

For example in 2.6.4

If you specify the collection it will only drop that.
```
$ mongoimport -d test2 -c test --drop test.js
connected to: 127.0.0.1
2014-09-22T16:44:01.692+0100 dropping: test2.test
2014-09-22T16:44:01.715+0100 imported 1 objects
```

If you don't specify it. It will only drop the collection with the same name as the file you're importing.
```
$mongoimport -d test2 --drop test.js
connected to: 127.0.0.1
no collection specified!
using filename 'test' as collection.
2014-09-22T16:44:32.534+0100 dropping: test2.test
2014-09-22T16:44:32.537+0100 imported 1 objects
```

I had another collection in the test2 database and that was never dropped.