Shell command to remove all local ruby gems

From StackOverflow of course – http://stackoverflow.com/questions/4907668/removing-all-installed-gems-and-starting-over

 

for x in `gem list --no-versions`; do gem uninstall $x -a -x -I; done

You may have to add sudo in front of ‘do gem uninstall’ if your user isn’t authorized to remove gmes.