RVM: Uninstalling all gems of a gemset

2019-01-16 00:57发布

I have global gems and various gemsets. I want to remove all gems of a gemset. Is there a way do to this, besides uninstalling the gemset?

标签: ruby rvm
7条回答
一纸荒年 Trace。
2楼-- · 2019-01-16 01:34

you can also use rvm --force gemset empty

查看更多
兄弟一词,经得起流年.
3楼-- · 2019-01-16 01:45

This is the safest way to uninstalling all gems of a gemset

Step 1

If you gem version is less then 2.1.

gem update --system

gem --version

Step 2

gem uninstall --all

references

查看更多
放荡不羁爱自由
4楼-- · 2019-01-16 01:46

rvm gemset empty <gemset> works, but only if you specify a gemset name.

If you want to empty the default gemset, you need to pass an empty string for the gemset name.

rvm gemset empty mygems ""

查看更多
Emotional °昔
5楼-- · 2019-01-16 01:47

This command removes all the ruby gems installed locally in 1-step Works well in Ubuntu 10.10

gem list | cut -d" " -f1 | xargs gem uninstall -aIx

PS - removes all local gems. Use sudo accordingly.

查看更多
劫难
6楼-- · 2019-01-16 01:51

Use the gemset empty command:

rvm gemset empty mygems
查看更多
疯言疯语
7楼-- · 2019-01-16 01:54

rvm gemset empty <gemset name>

This will remove all gems from your mentioned gemset.

查看更多
登录 后发表回答