Uninstall all installed gems, in OSX?

后端 未结 13 1232
别那么骄傲
别那么骄傲 2020-12-07 07:07

There are instances where I would like to revert and uninstall all previous gem installations.

For instance, I needed to assist a friend migrate their rails developm

13条回答
  •  情话喂你
    2020-12-07 07:33

    If you like doing it using ruby:

    ruby -e "`gem list`.split(/$/).each { |line| puts `gem uninstall -Iax #{line.split(' ')[0]}` unless line.strip.empty? }"
    

    Cheers

提交回复
热议问题