How to remove Ruby 1.9.1 correctly

Hi :) I manually installed Ruby 1.9.1. I installed it through

./configure --prefix=/opt
make
make install

The target "uninstall" does not exist in the generated Makefile ...
How do I uninstall correctly?

PS: I also believe that you need to remove all the gems.
For this I use

#!/bin/sh
gem list --local | grep [^\*] | cut -d ' ' -f 1 | xargs gem uninstall
+3
source share
1 answer

I had a similar problem with other software installed in /opt. I solved the problem with

  • creating an empty directory elsewhere (e.g. /tmp/ruby)
  • install the same version that you want to remove in this directory
  • , /tmp/ruby /opt.

unix :

$ find /tmp/ruby | sed "s/\/tmp\/ruby\//\/opt\//"

, , :

$ find /tmp/ruby | sed "s/\/tmp\/ruby\//\/opt\//" | xargs rm

...

0

Source: https://habr.com/ru/post/1725179/


All Articles