Hi,
I’m trying to uninstall an old version of Ruby from my Ubuntu Linux system. Here is my uname -a info …
Code:
myuser@mymachine:~$ uname -a
Linux mymachine 3.13.0-79-generic #123-Ubuntu SMP Fri Feb 19 14:27:58 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
So I tried “sudo apt-get purge ruby”. That seemed to remove everything ok, but when I check my /usr/lib/ruby directory, it was still there …
Code:
myuser@mymachine:~$ ls /usr/lib/ruby
1.9.1 2.3.0 gems vendor_ruby
Here is the output of the above command …
Code:
myuser@mymachine:~$ sudo apt-get purge ruby
[sudo] password for myuser:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libgoogle-perftools-dev libgoogle-perftools4 libruby1.9.1
libtcmalloc-minimal4 libunwind8 libunwind8-dev ruby1.9.1 ruby1.9.1-dev
Suggested packages:
ruby1.9.1-examples ri1.9.1 graphviz ruby-switch
The following packages will be REMOVED:
ruby*
The following NEW packages will be installed:
libgoogle-perftools-dev libgoogle-perftools4 libtcmalloc-minimal4 libunwind8
libunwind8-dev
The following packages will be upgraded:
libruby1.9.1 ruby1.9.1 ruby1.9.1-dev
3 upgraded, 5 newly installed, 1 to remove and 120 not upgraded.
Need to get 5,392 kB of archives.
After this operation, 8,053 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu/ trusty/main ruby1.9.1-dev amd64 1:1.9.3.551-2bbox1~trusty1 [1,075 kB]
Get:2 http://mirrors.digitalocean.com/ubuntu/ trusty-updates/main libtcmalloc-minimal4 amd64 2.1-2ubuntu1.1 [103 kB]
Get:3 http://mirrors.digitalocean.com/ubuntu/ trusty/main libunwind8 amd64 1.1-2.2ubuntu3 [48.3 kB]
Get:4 http://mirrors.digitalocean.com/ubuntu/ trusty-updates/main libgoogle-perftools4 amd64 2.1-2ubuntu1.1 [184 kB]
Get:5 http://mirrors.digitalocean.com/ubuntu/ trusty/main libunwind8-dev amd64 1.1-2.2ubuntu3 [375 kB]
Get:6 http://mirrors.digitalocean.com/ubuntu/ trusty-updates/main libgoogle-perftools-dev amd64 2.1-2ubuntu1.1 [407 kB]
Get:7 http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu/ trusty/main ruby1.9.1 amd64 1:1.9.3.551-2bbox1~trusty1 [236 kB]
Get:8 http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu/ trusty/main libruby1.9.1 amd64 1:1.9.3.551-2bbox1~trusty1 [2,962 kB]
Fetched 5,392 kB in 2s (2,113 kB/s)
Selecting previously unselected package libtcmalloc-minimal4.
(Reading database ... 98051 files and directories currently installed.)
Preparing to unpack .../libtcmalloc-minimal4_2.1-2ubuntu1.1_amd64.deb ...
Unpacking libtcmalloc-minimal4 (2.1-2ubuntu1.1) ...
Selecting previously unselected package libunwind8.
Preparing to unpack .../libunwind8_1.1-2.2ubuntu3_amd64.deb ...
Unpacking libunwind8 (1.1-2.2ubuntu3) ...
Selecting previously unselected package libgoogle-perftools4.
Preparing to unpack .../libgoogle-perftools4_2.1-2ubuntu1.1_amd64.deb ...
Unpacking libgoogle-perftools4 (2.1-2ubuntu1.1) ...
Selecting previously unselected package libunwind8-dev.
Preparing to unpack .../libunwind8-dev_1.1-2.2ubuntu3_amd64.deb ...
Unpacking libunwind8-dev (1.1-2.2ubuntu3) ...
Selecting previously unselected package libgoogle-perftools-dev.
Preparing to unpack .../libgoogle-perftools-dev_2.1-2ubuntu1.1_amd64.deb ...
Unpacking libgoogle-perftools-dev (2.1-2ubuntu1.1) ...
Preparing to unpack .../ruby1.9.1-dev_1%3a1.9.3.551-2bbox1~trusty1_amd64.deb ...
Unpacking ruby1.9.1-dev (1:1.9.3.551-2bbox1~trusty1) over (1.9.3.484-2ubuntu1.2) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
dpkg: ruby: dependency problems, but removing anyway as you requested:
ruby1.9.1 depends on ruby (>= 1:1.9.3.1).
(Reading database ... 98225 files and directories currently installed.)
Removing ruby (1:1.9.3.4) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
(Reading database ... 98206 files and directories currently installed.)
Preparing to unpack .../ruby1.9.1_1%3a1.9.3.551-2bbox1~trusty1_amd64.deb ...
Unpacking ruby1.9.1 (1:1.9.3.551-2bbox1~trusty1) over (1.9.3.484-2ubuntu1.2) ...
Preparing to unpack .../libruby1.9.1_1%3a1.9.3.551-2bbox1~trusty1_amd64.deb ...
Unpacking libruby1.9.1 (1:1.9.3.551-2bbox1~trusty1) over (1.9.3.484-2ubuntu1.2) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up libtcmalloc-minimal4 (2.1-2ubuntu1.1) ...
Setting up libunwind8 (1.1-2.2ubuntu3) ...
Setting up libgoogle-perftools4 (2.1-2ubuntu1.1) ...
Setting up libunwind8-dev (1.1-2.2ubuntu3) ...
Setting up libgoogle-perftools-dev (2.1-2ubuntu1.1) ...
Setting up libruby1.9.1 (1:1.9.3.551-2bbox1~trusty1) ...
Setting up ruby1.9.1-dev (1:1.9.3.551-2bbox1~trusty1) ...
Setting up ruby1.9.1 (1:1.9.3.551-2bbox1~trusty1) ...
update-alternatives: warning: forcing reinstallation of alternative /usr/bin/gem2.3 because link group gem is broken
update-alternatives: warning: forcing reinstallation of alternative /usr/bin/ruby2.3 because link group ruby is broken
update-alternatives: warning: skip creation of /usr/share/man/man1/rake.1.gz because associated file /usr/share/man/man1/rake2.3.1.gz (of link group ruby) doesn't exist
update-alternatives: warning: skip creation of /usr/bin/testrb because associated file /usr/bin/testrb2.3 (of link group ruby) doesn't exist
Processing triggers for libc-bin (2.19-0ubuntu6.7) ...
What is the right way to uninstall ruby?