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:
rm -rf .rvm*
Next you’ll want to remove the following line from your .bash_profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
You’ll then want to remove the /etc/rvmrc file as this has some information about the RVM install in your /home folder
sudo rm -rf /etc/rvm*
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)
sudo groupdel rvm
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.