Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I uninstall ruby and gems using RVM?

Tags:

I'm just learning to use RVM, and would like to know how I can do the following:

  1. Remove a specific version of Ruby and/or all versions of Ruby.
  2. Verify the removal that version, both using RVM and simply looking into my directories, config files, etc (where should I look?)
  3. Installing a specific version of Ruby.

Also, how would I do the above with gems?

Thanks in advance for your help.

like image 274
Nathan Avatar asked Jan 15 '12 08:01

Nathan


People also ask

How do I uninstall a specific version of ruby?

Any gems that you install while using an RVM's ruby version, is self contained in that version. However there may come a time when you no longer want to use a particular ruby version and want to delete it along with all it's gems. Then this can be done using the “remove” command.

How do I delete Gemset RVM?

You need to specify the gemset you want to empty. It's not enough just to "rvm use [gemset_name]". You need to "rvm gemset empty [gemset_name]". I suppose if you have many gems, it could take a while to uninstall them all.


1 Answers

Basically taken from http://beginrescueend.com/rvm/:

To list the available ruby versions to install type:

rvm list known 

To then install from the list of known, type:

rvm install VERSION_NUMBER 

To then use the ruby version you have installed:

rvm use VERSION_NUMBER 

You can make a certain ruby version your system default version:

rvm use VERSION_NUMBER --default 

To remove the ruby version and keep the gemsets:

rvm uninstall VERSION_NUMBER 

To remove ruby and its associated gemsets:

rvm remove VERSION_NUMBER 

To learn about your ruby environment and where they are installed / aliased:

rvm info 
like image 167
Ben Woodall Avatar answered Nov 17 '22 05:11

Ben Woodall