I has been install a ruby version 3.1.2 at my Mac computer and I want to uninstall it completely.
When I check by this command
which -a ruby
It show me this
/Users/nguyencuc/.rubies/ruby-3.1.2/bin/ruby
/usr/bin/ruby
So, as this page said, https://mac.install.guide/ruby/9.html, maybe it is a system ruby ?
So how can I completely uninstall this ruby to install another version of ruby ? Could you please give me some advices ? Thank you very much for your time.
CodePudding user response:
As you have installed ruby, not using rbenv or rvm, there are two ways through which you can remove it.
- Using Command
brew uninstall --force ruby
- Or you have to manually remove the ruby files from your system. Type
whereis ruby
to find where it is installed and then remove the files usingrm
CodePudding user response:
If you have installed ruby via Rbenv, type this:
rbenv uninstall 3.1.2
For installing another version, type:
rbenv install *version*