Skip to content

Instantly share code, notes, and snippets.

@davidmfoley
Created May 18, 2011 15:06
Show Gist options
  • Save davidmfoley/978761 to your computer and use it in GitHub Desktop.
Save davidmfoley/978761 to your computer and use it in GitHub Desktop.
Drop all mongodb tmp collections
names = db.getCollectionNames(); for (var i = 0; i < names.length; i++) { if (names[i].substring(0,4) =='tmp.') { print(names[i]); db.getCollection(names[i]).drop(); }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment