Uninstall all installed gems, in OSX?

后端 未结 13 1218
别那么骄傲
别那么骄傲 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:20

    gem list --no-version | grep -v -e 'psych' -e 'rdoc' -e 'openssl' -e 'json' -e 'io-console' -e 'bigdecimal' | xargs sudo gem uninstall -ax
    

    grep here is excluding default gems. All other gems will be uninstalled. You can also precede it with sudo in case you get permission issues.

提交回复
热议问题