harinsamaranayake
harinsamaranayake

Reputation: 961

How to uninstall RVM in Ubuntu 18.04 completely?

I tried uninstalling rvm in Ubuntu LTS 18.04 using the following command:

rvm implode

After uninstalling, I tried installing it again using the following command:

sudo apt-get install rvm

But re-installation was unsuccessful and when I run rvm I get the following:

rvm: command not found

What are the steps to correctly remove rvm?

Upvotes: 0

Views: 3869

Answers (2)

Efraín Arreche
Efraín Arreche

Reputation: 26

According to the official information it souldn't work with just apt-get.

Visit this page and follow the steps.

Upvotes: 0

WildWilyWilly
WildWilyWilly

Reputation: 141

After the command rvm implode you should run gem uninstall rvm to make sure there's nothing left in your Ruby system install pointing to your rvm folder.

Usually, in order to remove what you have, sudo apt-get remove rvm should suffice, else try adding the --purge flag like in sudo apt-get remove rvm --purge. I understand you wanted to use the built-in command though. I don't know where you found the instructions you have followed, but it's weird that they didn't insist on the next step (uninstalling the gem).

For reinstalling, RVM has a dedicated Ubuntu package. My advice is to do what I did to install it on my work computer, which was running Ubuntu. It's all listed here, but to take you through it:

  1. Add the offical repository, update and install
sudo apt-add-repository -y ppa:rael-gc/rvm
sudo apt-get update
sudo apt-get install rvm
  1. You'll have a group 'rvm' among your user groups. Add your user to it

sudo usermod -a -G rvm <yourusername>

In the link I included you'll find the instructions to have your terminal (assuming you're using Gnome as your Desktop Environment) login every time you reboot, enable local gems, install and change versions of Ruby and more.

Upvotes: 1

Related Questions