Mongodb shell drop collections with wild card

Unfortunately there is no such option.

  1. You can retrieve all the available collections using getCollectionNames

  2. Then you can check for include/exclude scenarios.

  3. When the condition matches, you can perform drop on it.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top