How to uninstall all ruby gems on windows?

前端 未结 4 1943
醉话见心
醉话见心 2021-01-31 18:24

How to uninstall all ruby gems on Windows? Is it possible with single command?

4条回答
  •  北恋
    北恋 (楼主)
    2021-01-31 18:55

    One line to rule them all. Power shell not needed. From command prompt run:

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

    Just copy / paste and voila!

提交回复
热议问题