10

I installed ruby 1.9 on my fedora 13 machine from source. I want to go back and use the older 1.8.6 (which I'll install with yum), unfortunetly it appears that I can't simply uninstall my current version by "make uninstall" (make: *** No rule to make targetuninstall'. Stop.`).

Is there any way of doing this other than removing each individual file?

vise
  • 235
  • 1
  • 3
  • 9

4 Answers4

12

There is a file in the build directory called .installed.list. This appears to be a list of all the files that get installed.

user9517
  • 114,104
  • 20
  • 206
  • 289
  • 2
    Thank you. In the end I ran "cat .installed.list | xargs rm". It could only delete files (not directories - this is what I wanted), which was good enough for me. – vise May 29 '10 at 16:06
1

If ruby was installed in the following way:

./configure --prefix=/usr/local
make
sudo make install

You can uninstall it in the following way:

Check installed ruby version; lets assume 2.1.2

wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.bz2
bunzip ...
tar xfv ...
cd ruby-2.1.2
./configure --prefix=/usr/local
make
sudo checkinstall
  # will build deb or rpm package and try to install it

After installation, you can now remove the package and it will remove the directories/files/etc.

sudo rpm -e ruby

There might be some artifacts left:

Removing ruby ...
  warning: while removing ruby, directory '/usr/local/lib/ruby/gems/2.1.0/gems' not empty so not removed.
  ...

Remove them manually.

Paweł Gościcki
  • 1,100
  • 1
  • 15
  • 18
0

Look in the Makefile to see if there's another target such as remove.

Dennis Williamson
  • 60,515
  • 14
  • 113
  • 148
-1

You can run the following commands:

cd ruby-x.x.x (your source code directory)
sudo make uninstall
sudo rm -r /usr/local/lib/ruby
Swisstone
  • 6,357
  • 7
  • 21
  • 32