Skip to content

Instantly share code, notes, and snippets.

@havenwood
Created June 14, 2011 23:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save havenwood/1026168 to your computer and use it in GitHub Desktop.
Save havenwood/1026168 to your computer and use it in GitHub Desktop.
Uninstall all gems
open("|gem list").read.each_line { |gem| system "gem uninstall -aI #{gem[/^\w+/]}" }
# or something related like `gem list`.split("\n").each { |gem| system "gem uninstall -aI #{gem.split(" ").first}" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment