Ruby2.0でgemを全てアンインストールする

  • 30
    Like
  • 0
    Comment
More than 1 year has passed since last update.
gem uninstall -axI `gem list --no-versions`
ERROR:  While executing gem ... (Gem::InstallError)
    gem "test-unit" cannot be uninstalled because it is a default gem

って怒られてできなかったからメモ

gem uninstall -axI `gem list --no-versions | egrep -v 'test-unit|rdoc|bigdecimal|io-console|json|minitest|psych|rake'`

参考

Uninstall all installed (non-default) gems.