A
A
Anton2016-01-29 02:10:31
ruby
Anton, 2016-01-29 02:10:31

How to remove Ruby from the server?

Hello!
How to completely remove Ruby from the server?

# which ruby
/usr/local/bin/ruby

# whereis ruby
ruby: /usr/bin/ruby1.8 /usr/bin/ruby /usr/lib/ruby /usr/bin/X11/ruby1.8 /usr/bin/X11/ruby /usr/local/bin/ruby /usr/local/lib/ruby /usr/share/man/man1/ruby.1.gz

It was not installed via apt-get. Just delete the ruby ​​directory (/usr/local/bin/ruby) and restart the server?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vlad Zhivotnev, 2016-01-29
@inkvizitor68sl

dpkg -l | grep ruby
​​And carefully remove the packages that are found.

N
Nikolai Turnaviotov, 2016-01-29
@foxmuldercp

the uninstall procedure is always the opposite of the installation procedure.
if you messed up something like hell, or want to experiment - it's better to use the installation of ruby, rails and gems via rbenv, in your home directory without affecting the system

P
Pavel Laptev, 2016-01-29
@pasystem

With this command, you can see which Ruby is currently in use.

lsof -c ruby | grep 'ruby$'
ruby     940 deployer  txt    REG               0,36   127407  56362580 /home/deployer/.rvm/rubies/ruby-2.2.1/bin/ruby

If /usr/local/bin/ruby is not used, you can safely delete it.
If you haven't deleted the ruby ​​source directory, look at the .installed.list file in it, you will see all the paths where you uploaded the files after make install.
This is a quick cleanup of files from .installed.list
but empty directories will remain, it is better to delete them manually
/usr/local/include/ruby-x.x.x/
/usr/local/lib/ruby
/usr/local/share/ri

More or less like this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question