29

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.

0

1 Answer 1

83

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
1
  • Unfortunately, this does not answer the question what to do about the Gems. If anybody knows, please post the answer. I've got plenty of Ruby versions on my machine, starting from 2.3.1, and I've only recently discovered (my disk is running out of space) that rvm uninstall will leave all the old Gems where they are. My gems folder inside the .rvm folder is 12 GB, most of which is for stone-old Ruby versions. I can remove them by hand, but I don't like messing with a folder that's maintained by rvm.
    – MDickten
    Commented May 8, 2023 at 10:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.