Completely Removing RVM

Today I had to change an single user installation of Ruby Version Manager (RVM), to a system wide installation.  But after removing the .rvm folder and .rvmrc file from the user directory, running the RVM installation script would still install to the user directory instead of the system wide /usr/local/rvm directory.  What I found is that RVM will embed itself deeply in your system and there are a few more things you have to do, below are the steps to completely remove RVM from your computer.

First you’ll need to remove the stuff in your /home directory:

[bash]
rm -rf .rvm*
[/bash]

Next you’ll want to remove the following line from your .bash_profile

[text]
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
[/text]

You’ll then want to remove the /etc/rvmrc file as this has some information about the RVM install in your /home folder

[bash]
sudo rm -rf /etc/rvm*
[/bash]

Finally you’ll want to remove the group it created (this will be there if you attempted a system wide install, but hadn’t cleared out everything, running this command will have no effect if the group isn’t there)

[bash]
sudo groupdel rvm
[/bash]

This should remove RVM from your system completely, and allow you to do a system wide install that will install to /usr/local/rvm as expected.

This entry was posted in programming and tagged , , . Bookmark the permalink.

3 Responses to Completely Removing RVM

  1. Rodrigo Dlugokenski says:

    Nice. Exactly what I needed.

  2. ant says:

    Going the other way (from site-wide to single user rvm) you might also want to remove /etc/profile.d/rvm.sh and /usr/share/ruby-rvm

Comments are closed.