Remove RVM, Ruby and gems completely?

2019-09-01 02:11发布

I had to downgrade Rails and now the gems, the versions, and everything, are completely messed up and I feel like jumping from my window.

I just want to destroy everything related with RVM, Ruby and gems to make sure I make a 100% clean reinstallation.

How can I do that?

3条回答
手持菜刀,她持情操
2楼-- · 2019-09-01 02:13

Linux and installed as regular user ? Than all you need to do is:

rm -Rf ./.rvm
rm -Rf ./.gem
rm -f ./.gemrc

You can also check ~/.bashrc and ~/.bash_profile files for lines like this:

PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

This should be enough. If you've installed it in some custom way then try this:

$ rvm list # to see what version you have installed
$ rvm gemdir # to see where are gemfiles located

There is something like rvm remove as well but, if you want to just remove all, than it's not very interesting I think.

查看更多
爷的心禁止访问
3楼-- · 2019-09-01 02:25

If you have installed everything via rvm a simple

rvm implode

will remove all traces of rvm including rubies and gems. Even (as far as I remember, I'm not testing it right now) the shell files are updated.

查看更多
SAY GOODBYE
4楼-- · 2019-09-01 02:30

rvm implode which removes all ruby installations rvm manages, everything in ~/.rvm

查看更多
登录 后发表回答