Skip to content

Instantly share code, notes, and snippets.

@jwswj
Created August 1, 2013 04:45
Show Gist options
  • Save jwswj/6128473 to your computer and use it in GitHub Desktop.
Save jwswj/6128473 to your computer and use it in GitHub Desktop.
Remove all global gems
gem list | cut -d" " -f1 | xargs gem uninstall -aIx
@webmaster128
Copy link

Right now, the output of gem list contains lines without gems:

$ gem list

*** LOCAL GEMS ***

bigdecimal (1.2.8)
io-console (0.4.5)
json (1.8.3)
psych (2.1.0)
rdoc (4.2.1)

Thus I change gem list to gem list | grep -F "(".

@bgrand-ch
Copy link

Thanks 👍

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