I have many rubies installed by ruby-install under ~/.rubies:
ls .rubies ruby-1.9.3-p545 ruby-2.0.0-p598 ruby-2.1.3 ruby-2.1.5 ruby-2.0.0-p451 ruby-2.1.2 ruby-2.1.4 ruby-2.2.0 I want to uninstall one of the ruby installed by ruby-install, How do I do that?
Use rbenv versions to see which versions you have installed. To remove a Ruby version from rbenv, delete the corresponding directory in ~/. rbenv/versions .
Uninstall Ruby on Mac with rbenv For rbenv, use rbenv versions to see which versions you have installed. Use the uninstall command to remove a version. This will remove any gems associated with the version as well. If you want to reinstall Ruby, see Install Ruby on Mac for recommendations of newer version managers.
Unfortunately appears that ruby-install just downloads and compiles Ruby, with no option to remove it, unlike RVM or rbenv.
So, probably you'll need to run some manual commands here to delete all installed files.
Usually ruby-install will install rubies in ~/.rubies/ folder.
If you're not sure which ruby was installed using ruby-install, locate the file .installed.list, as it has a list of installed files during Ruby install. If you want to quickly locate it, just run locate .installed.list and you'll get a short list of them.
Then run a cat on the file located at the version you want to remove, to make sure which is the root folder for the ruby install you want to delete.
Then you can just remove the folder where the target version is located.
If you want to remove ruby-1.9.3-p545, run:
rm -Rf ~/.rubies/ruby-1.9.3-p545
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With