Skip to content

Instantly share code, notes, and snippets.

@fabrizioc1
Created July 10, 2011 21:00
Show Gist options
  • Save fabrizioc1/1074968 to your computer and use it in GitHub Desktop.
Save fabrizioc1/1074968 to your computer and use it in GitHub Desktop.
Clean up all gems
#
# Now run gem-uninstall.sh
# The minimum needed for 1.9.2 is rake, rdoc, and minitest, usually they don't deleted
#
gems=`gem list`.split(/\n/).map{|gem| name=gem.gsub(/\s+\(.+?\)/,""); "gem uninstall -I -x -a #{name}"}
File.open("gem-uninstall.sh","w+") do |f| gems.each{|g| f.puts g} end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment