# How to uninstall ruby on FreeBSD 8.0?

**URL:** <https://www.ruby-forum.com/t/how-to-uninstall-ruby-on-freebsd-8-0/191889>\
**Category:** Ruby\
**Created:** [July 20, 2010, 11:30am UTC](https://www.ruby-forum.com/t/how-to-uninstall-ruby-on-freebsd-8-0/191889 "2010-07-20T11:30:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wilsonwang111](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/53a042/32.png) [@wilsonwang111](https://www.ruby-forum.com/u/wilsonwang111)\
**Post date:** [July 20, 2010, 11:30am UTC](https://www.ruby-forum.com/t/how-to-uninstall-ruby-on-freebsd-8-0/191889/1 "2010-07-20T11:30:06Z")

</div>

Dear all,

I am so stupid to install ruby in a wrong way so that I don’t know how  
to uninstall it from my server (OS: FreeBSD 8.0) now.

I did the following things:

1. wget ftp://ftp.ruby-lang.org//pub/ruby/1…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

---

<div class="post-metadata">

**Author:** ![wilsonwang111](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/53a042/32.png) [@wilsonwang111](https://www.ruby-forum.com/u/wilsonwang111)\
**Post date:** [July 20, 2010, 2:36pm UTC](https://www.ruby-forum.com/t/how-to-uninstall-ruby-on-freebsd-8-0/191889/2 "2010-07-20T14:36:28Z")

</div>

Hi Wilson,

Everything should be in /usr/local unless you changed the prefix in  
the configure script.

/usr/local/lib/ruby,  
/usr/local/bin/{ruby,ri,erb,irb}

May I suggest the ruby19 port from the ports system, or if you want  
newer, rvm?

> **[About FreeBSD Ports](https://www.freebsd.org/ports/)**
>
> FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms.

[http://rvm.beginrescueend.com/](http://rvm.beginrescueend.com/)

Regards,  
Jason

---

<div class="post-metadata">

**Author:** ![wilsonwang111](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/53a042/32.png) [@wilsonwang111](https://www.ruby-forum.com/u/wilsonwang111)\
**Post date:** [July 20, 2010, 2:38pm UTC](https://www.ruby-forum.com/t/how-to-uninstall-ruby-on-freebsd-8-0/191889/3 "2010-07-20T14:38:49Z")

</div>

On Tue, Jul 20, 2010 at 06:30:13PM +0900, Wilson Wang wrote:

> 1. cd ruby-1.9.1-p378
> 
> 2. 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!

Since Ruby follows largely the same rules as FreeBSD about where stuff  
goes, this isn’t actually too difficult to do. You need to find and  
delete  
any binaries/executables that were installed - ruby itself, irb, erb,  
ri, rdoc, etc. Then, delete /usr/local/lib/ruby/1.9, locate and remove  
man pages etc:

# find /usr/local/man -name ‘ruby\*’ -ok rm {} ;

should do the trick.

You may have some include files as well, which can probably be found in  
/usr/local/include.

When you install the correct version, use the ports - that way, if you  
ever need to remove it again, your ports management utility will be able  
to find and clear everything for you.

Dan

---

<div class="post-metadata">

**Author:** ![wilsonwang111](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/53a042/32.png) [@wilsonwang111](https://www.ruby-forum.com/u/wilsonwang111)\
**Post date:** [July 20, 2010, 2:51pm UTC](https://www.ruby-forum.com/t/how-to-uninstall-ruby-on-freebsd-8-0/191889/4 "2010-07-20T14:51:50Z")

</div>

Jason S. wrote:

> Hi Wilson,
> 
> Everything should be in /usr/local unless you changed the prefix in  
> the configure script.
> 
> /usr/local/lib/ruby,  
> /usr/local/bin/{ruby,ri,erb,irb}
> 
> May I suggest the ruby19 port from the ports system, or if you want  
> newer, rvm?  
> [About FreeBSD Ports | The FreeBSD Project](http://www.freebsd.org/ports)  
> [http://rvm.beginrescueend.com/](http://rvm.beginrescueend.com/)
> 
> Regards,  
> Jason

Hi Jason,

Thanks for your prompt reply!  
No, I did not change the prefix in the configure script.  
Therefore, do you mean that I can easily remove all of the dependent  
files in /usr/local/lib/ruby and /usr/local/bin/{ruby,ri,erb,irb}?

More specifically:  
rm -r /usr/local/lib/ruby  
rm -r /usr/local/bin/ruby  
rm -r /usr/local/bin/ri  
rm -r /usr/local/bin/erb  
rm -r /usr/local/bin/irb

I know how to install ruby19 from the ports system.  
However, I was so stupid trying to download the source code and  
installed it by my way…  
Thank you very much! I will never do these silly things again!

To Dan,

Thanks for your guidance!  
I will try it!  
Thanks again!

Sincerely,  
Wilson
