How to deinstall ruby?

Dear all,

I am a newbie in the FreeBSD world.
Here is the thing, I am so stupid to install ruby in a wrong way so that I don't know how to deinstall it from my server (OS: FreeBSD 8.0) now.

I did the following things:

1. wget ftp://ftp.ruby-lang.org//pub/ruby/1.9/ruby-1.9.1-p378.tar.gz

2. tar xzvf ruby-1.9.1-p378.tar.gz

3. cd ruby-1.9.1-p378

4. sudo make install


I just found the version I installed is not proper for my computer; it should be for "amd64-freebsd8" rather than "x86_64-freebsd8.0". However, I don't know how to deinstall it! There is no "deinstall" instruction in the Makefile. Can anyone help me solve this problem? Thank you very much!

Sincerely,
Wilson
 
Well, here running [cmd=""]./configure[/cmd] gives me a Makefile with
Code:
prefix = /usr/local
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
sbindir = ${exec_prefix}/sbin
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
datarootdir = ${prefix}/share
datadir = ${datarootdir}
arch = x86_64-freebsd8.1
sitearch = x86_64-freebsd8.1
sitedir = ${libdir}/${RUBY_INSTALL_NAME}/site_ruby
ruby_version = 1.9.1
So, figure out what time your ruby executable was installed, & use find(1) to return everything modified near that time under /usr/local/ (see above for the requisite subdirectories).


In any case, it looks like if you run ./configure the default doesn't install anything outside of /usr/local/, so if you haven't installed much (or anything else) from ports(7) or packages you can just blow away your /usr/local/ and start again.

If you have installed quite a bit of third party applications (xorg, firefox, openoffice, or the like) you might look into taking a backup of your /var/db/pkg/, installing ports-mgmt/portmaster and using it to create backup packages of everything*, destroying /usr/local/**, and reinstalling everything from the newly created packages.


*# portmaster -b \* should suffice (there doesn't appear to be some sort of --pretend or --dry-run flag for portmaster, so be careful)

**don't take this lightly, BUT everything under /usr/local should be fairly simply recreated
 
Back
Top