# Uninstalling/upgrading Ruby

**URL:** <https://www.ruby-forum.com/t/uninstalling-upgrading-ruby/98767>\
**Category:** Ruby\
**Created:** [July 18, 2006, 12:38am UTC](https://www.ruby-forum.com/t/uninstalling-upgrading-ruby/98767 "2006-07-18T00:38:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![digitalpodcast](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/278dde/32.png) [@digitalpodcast](https://www.ruby-forum.com/u/digitalpodcast)\
**Post date:** [July 18, 2006, 12:38am UTC](https://www.ruby-forum.com/t/uninstalling-upgrading-ruby/98767/1 "2006-07-18T00:38:59Z")

</div>

Hi,

I have Ruby 1.8.2 installed on a RHEL 3 server from the tarball, install  
with the usual make/make install procedure.  
How can I uninstall Ruby so I can install Ruby 1.8.4 ?

Also, can you tell how could I build a RPM package so I don’t have to  
worry about it in the future ?

Sorry about asking, I’m a newbie when it comes to Linux.

Thanks,

---

<div class="post-metadata">

**Author:** ![digitalpodcast](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/278dde/32.png) [@digitalpodcast](https://www.ruby-forum.com/u/digitalpodcast)\
**Post date:** [July 18, 2006, 2:30am UTC](https://www.ruby-forum.com/t/uninstalling-upgrading-ruby/98767/2 "2006-07-18T02:30:26Z")

</div>

On 7/17/06, Alex N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi,
> 
> I have Ruby 1.8.2 installed on a RHEL 3 server from the tarball, install  
> with the usual make/make install procedure.  
> How can I uninstall Ruby so I can install Ruby 1.8.4 ?

Unfortunately, there’s probably no customary “make uninstall”. Where  
is your version of 1.8.2 installed? You might be able to remove it  
manually…

When installing it yourself, you might give Ruby its own install  
directory, as described here:  
[http://wiki.rubygarden.org/Ruby/page/show/InstallingRuby](http://wiki.rubygarden.org/Ruby/page/show/InstallingRuby) (scroll down  
to “Custom Install on GNU/Linux”). This makes for easy removal for  
upgrading later on.

> Also, can you tell how could I build a RPM package so I don’t have to  
> worry about it in the future ?

If you follow the instructions for putting Ruby off in its own  
directory, you don’t need an rpm.

—John

---

<div class="post-metadata">

**Author:** ![digitalpodcast](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/278dde/32.png) [@digitalpodcast](https://www.ruby-forum.com/u/digitalpodcast)\
**Post date:** [July 18, 2006, 2:38pm UTC](https://www.ruby-forum.com/t/uninstalling-upgrading-ruby/98767/3 "2006-07-18T14:38:11Z")

</div>

On Jul 17, 2006, at 6:37 PM, Alex N. wrote:

> Thanks,

Chances are good that you can just install 1.8.4. It’ll likely  
overwrite the old stuff assuming you didn’t provide any switches to  
the install process.

You can google for how to build RPMs, but it’s not easy. The reason  
it knows where all the files are is because someone took the time to  
list them all in the SPEC file in the RPM. Go for it if you want,  
but I’d bet the spray-n-pray method will work fine for you.  
-Mat

---

<div class="post-metadata">

**Author:** ![digitalpodcast](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/278dde/32.png) [@digitalpodcast](https://www.ruby-forum.com/u/digitalpodcast)\
**Post date:** [July 18, 2006, 6:32pm UTC](https://www.ruby-forum.com/t/uninstalling-upgrading-ruby/98767/4 "2006-07-18T18:32:19Z")

</div>

Mat S. wrote:

> > Sorry about asking, I’m a newbie when it comes to Linux.  
> > list them all in the SPEC file in the RPM. Go for it if you want, but  
> > I’d bet the spray-n-pray method will work fine for you.  
> > -Mat  
> > Before you do that, you probably want to see where Ruby is currently:

whereis ruby

Then use ./configure --prefix=/that/prefix

For example:

whereis ruby =\> /usr/local/bin/ruby

Then use

./configure --prefix=/usr/local/

Hope that helps.

-Justin

---

<div class="post-metadata">

**Author:** ![digitalpodcast](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/278dde/32.png) [@digitalpodcast](https://www.ruby-forum.com/u/digitalpodcast)\
**Post date:** [July 18, 2006, 9:46am UTC](https://www.ruby-forum.com/t/uninstalling-upgrading-ruby/98767/5 "2006-07-18T09:46:10Z")

</div>

> I have Ruby 1.8.2 installed on a RHEL 3 server from the  
> tarball, install with the usual make/make install procedure.  
> How can I uninstall Ruby so I can install Ruby 1.8.4 ?

# ls -ld /usr/local/\*/{ruby,irb,erb,testrb,rdoc,ri}

# rm -rf /usr/local/\*/{ruby,irb,erb,testrb,rdoc,ri}

Use it at your own risk!

gegroet,  
Erik V. - [http://www.erikveen.dds.nl/](http://www.erikveen.dds.nl/)
