How to remove Ruby from Ubuntu

前端 未结 4 607
谎友^
谎友^ 2020-12-13 20:55

I want to remove Ruby, so I try this. How can I remove this?

sudo apt-get autoremove ruby
Reading package lists... Done
Building dependency tree       
Readi         


        
4条回答
  •  一生所求
    2020-12-13 21:49

    Ubuntu...?

    Use this to find out what executable you're running:

    $ which ruby
    /usr/bin/ruby
    

    Use this to find out what it actually is:

    $ readlink -f /usr/bin/ruby
    /usr/bin/ruby1.8
    

    Use this to find out what package it belongs to:

    $ dpkg -S /usr/bin/ruby1.8
    ruby1.8: /usr/bin/ruby1.8
    

    Use this to uninstall that:

    $ apt-get purge ruby1.8
    

    Note: If you have installed Ruby using Version/Environment managers like RVM or Rbenv then this method is not gonna work because Rubies will be installed as scripts not packages.

提交回复
热议问题