3

I am new to Rails and Linux and have installed RVM with sudo.

sudo bash -s stable < <(curl -s https://raw.github/wayneeseguin/rvm/master/binscripts/rvm-installer)

Now I have to run most commands (like spork) with 'rvmsudo'. It is redundant, and the way I learned, when something is redundand it is often wrong. How to get rid of this nuance? Is the only way to reinstall RVM? If so, how to properly reinstall?

oFca
  • 2,830
  • 6
  • 31
  • 43

3 Answers3

3

Use rvm implode to uninstall rvm. Check that there are no environment variables left over in /etc/profile, /etc/bash_profile or whatever shell you're using. Once you do that, then re-install using the single user guide found here.

You'll have to execute the implode command using sudo since you installed it as root.

nathan
  • 5,513
  • 4
  • 35
  • 47
  • When I go rvm remove it says this : 'Really? remove all? See "rvm list known" and limit the selection to something more sane please :)'? – oFca Mar 29 '12 at 19:51
  • ah, I see. Then in that case this is a duplicate question. http://stackoverflow.com/questions/3950260/howto-uninstall-rvm – nathan Mar 29 '12 at 19:59
1

1)remove in home directory:

rm -rf .rvm*

2)remove from your bash file:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"

3) remove from /etc/rvmrc file

sudo rm -rf /etc/rvm*

4)Delete everything else

sudo groupdel rvm
lifejuggler
  • 460
  • 6
  • 17
0

I couldn't find a complete/concise step-by-step to 100% remove rvm when it was run as root. Here's what I came up with, and I've tested it three times successfully:

sudo su -
rvm implode
groupdel rvm
rm /etc/rvmrc
rm /etc/profile.d/rvm.sh

You'll also want to double check that you don't have ~/.rvm or ~/.rvmrc or any rvm whatnot in your .bashrc (possibly .bash_profile on OSx), as you've likely been trying to install rvm several ways by this point!

Next, you'll need to reboot, as the global environment variables set in /etc/profile.d/rvm.sh will keep getting populated in new shells until you do. After rebooting, open a terminal and try this command to test:

echo $rvm_path

If it's empty, that means you've succeeded! If not, it'll most likely be set to /usr/local/rvm.