Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove Ruby from Ubuntu

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       
Reading state information... Done
Package 'ruby' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 534 not upgraded.

here@jaskaran:/$ whereis ruby
    ruby: /usr/bin/ruby /usr/lib/ruby /usr/bin/X11/ruby /usr/share/man/man1/ruby.1.gz
here@jaskaran:/$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]
like image 340
Harman Avatar asked Mar 31 '14 04:03

Harman


1 Answers

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.

like image 145
Amadan Avatar answered Sep 30 '22 02:09

Amadan