How to uninstall Ruby from /usr/local?

前端 未结 6 1490
长情又很酷
长情又很酷 2020-12-08 10:28

Everything was working fine , until we decided to upgrade ruby to 1.8.7 from 1.8.6, and thats when all hell broke loose. When we compiled Ruby 1.8.7 from source it got insta

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-08 10:56

    Edit: As suggested in comments. This solution is for Linux OS. That too if you have installed ruby manually from package-manager.

    If you want to have multiple ruby versions, better to have RVM. In that case you don't need to remove ruby older version.

    Still if want to remove then follow the steps below:

    First you should find where Ruby is:

    whereis ruby
    

    will list all the places where it exists on your system, then you can remove all them explicitly. Or you can use something like this:

    rm -rf /usr/local/lib/ruby
    rm -rf /usr/lib/ruby
    rm -f /usr/local/bin/ruby
    rm -f /usr/bin/ruby
    rm -f /usr/local/bin/irb
    rm -f /usr/bin/irb
    rm -f /usr/local/bin/gem
    rm -f /usr/bin/gem
    

提交回复
热议问题