How do I cleanly remove ruby 1.8.7 from CentOS 5?
Solution 1:
You shouldn't install software this way.
Removing software which was installed like this may be dangerous:
- unpack the same ruby to /tmp
- run:
./configure --prefix=/tmp/somedir # by default prefix points to /usr/local make make install # this will install ruby in /tmp/somedir instead of where you've installed it cd /tmp/somedir find . -type f -exec rm -i /usr/local{} \; # Use without -i if you are shure find . -type d -exec rm -ir /usr/local{} \;
I hope this will help you
Solution 2:
You could also try the technique from this question. Basically look for .installed.list
in the directory you built ruby in. This should have a list of all the files installed. One way to remove them all would be
cat .installed.list | xargs rm
Note that this will only delete files, not directories. I guess you could also do
cat .installed.list | xargs rmdir
after the first command. That should clean up the directories aswell. And rmdir
will not remove a directory if it still contains files, so it should be safe ...
Solution 3:
This works for me.
more .installed.list | xargs rm -rfv