dabadaba
dabadaba

Reputation: 9512

Remove RVM, Ruby and gems completely?

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?

Upvotes: 1

Views: 4526

Answers (3)

Amrit Dhungana
Amrit Dhungana

Reputation: 4485

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

Upvotes: 1

pawel7318
pawel7318

Reputation: 3583

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.

Upvotes: 3

Karsten S.
Karsten S.

Reputation: 2391

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.

Upvotes: 3

Related Questions