Skip to content

Instantly share code, notes, and snippets.

@mmontalvo
Last active September 24, 2015 04:57
Show Gist options
  • Save mmontalvo/670558 to your computer and use it in GitHub Desktop.
Save mmontalvo/670558 to your computer and use it in GitHub Desktop.
List of useful commands
# To uninstall ALL gems
for i in `gem list --no-versions`; do gem uninstall -aIx $i; done
@mmontalvo
Copy link
Author

A better solution (without crashes from the different versions problem):
gem list | cut -d" " -f1 | xargs gem uninstall -aIx

(from http://www.arailsdemo.com/posts/18 and originally taken from http://geekystuff.net/2009/1/14/remove-all-ruby-gems)

@mmontalvo
Copy link
Author

For Ruby 2.0

(from http://stackoverflow.com/questions/15100496/uninstalling-all-gems-ruby-2-0-0)

for i in gem list --no-versions; do gem uninstall -aIx $i; done

@mmontalvo
Copy link
Author

StackOverflow to the rescue! (http://stackoverflow.com/questions/8095209/uninstall-all-installed-gems-in-osx)

for i in gem list --no-versions; do gem uninstall -aIx $i; done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment