# Removing RubyGems

**URL:** <https://www.ruby-forum.com/t/removing-rubygems/51322>\
**Category:** Ruby\
**Created:** [December 29, 2005, 6:09pm UTC](https://www.ruby-forum.com/t/removing-rubygems/51322 "2005-12-29T18:09:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![waddilove](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/b5ac83/32.png) [@waddilove](https://www.ruby-forum.com/u/waddilove)\
**Post date:** [December 29, 2005, 6:09pm UTC](https://www.ruby-forum.com/t/removing-rubygems/51322/1 "2005-12-29T18:09:49Z")

</div>

Hmm, I have ended up with multiple instances of RubyGems installed on my  
OS X system. I can use PATH to ensure that the correct version is used,  
but I’d like to clean the system up.

Can some kind person describe the process for reversing the ‘ruby  
setup.rb’ to ensure a full and clean remove of the package?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![waddilove](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/b5ac83/32.png) [@waddilove](https://www.ruby-forum.com/u/waddilove)\
**Post date:** [December 29, 2005, 7:10pm UTC](https://www.ruby-forum.com/t/removing-rubygems/51322/2 "2005-12-29T19:10:46Z")

</div>

Jonathan W. wrote:

> Hmm, I have ended up with multiple instances of RubyGems installed on my  
> OS X system. I can use PATH to ensure that the correct version is used,  
> but I’d like to clean the system up.
> 
> Can some kind person describe the process for reversing the ‘ruby  
> setup.rb’ to ensure a full and clean remove of the package?

To remove RubyGems from a single Ruby installation, from the  
site\_ruby/1.8 directory of that installation, remove:

- rubygems.rb (file)
- rubygems (directory)

If you do not have RubyGems installed in other Ruby installation  
directories, you can also remove the following files from whatever  
command directory is listed in your PATH:

- gem
- gemwhich
- gem\_server
- gem\_mirror
- generate\_yaml\_index.rb

And if you are removing RubyGems completely, don’t forget to remove the  
RUBYOPT environment variable from your environment.

Without actually trying it, I think that will do it.

–  
– Jim W.

---

<div class="post-metadata">

**Author:** ![waddilove](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/b5ac83/32.png) [@waddilove](https://www.ruby-forum.com/u/waddilove)\
**Post date:** [December 31, 2005, 1:33pm UTC](https://www.ruby-forum.com/t/removing-rubygems/51322/3 "2005-12-31T13:33:43Z")

</div>

you forgot to tell us what “that” is in case someone else has that  
problem!

---

<div class="post-metadata">

**Author:** ![waddilove](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/b5ac83/32.png) [@waddilove](https://www.ruby-forum.com/u/waddilove)\
**Post date:** [December 29, 2005, 8:37pm UTC](https://www.ruby-forum.com/t/removing-rubygems/51322/4 "2005-12-29T20:37:08Z")

</div>

Jim W. wrote:

> To remove RubyGems from a single Ruby installation, from the  
> site\_ruby/1.8 directory of that installation, remove:
> 
> - rubygems.rb (file)
> - rubygems (directory)
> 
> If you do not have RubyGems installed in other Ruby installation  
> directories, you can also remove the following files from whatever  
> command directory is listed in your PATH:
> 
> - gem
> - gemwhich
> - gem\_server
> - gem\_mirror
> - generate\_yaml\_index.rb
> 
> And if you are removing RubyGems completely, don’t forget to remove the  
> RUBYOPT environment variable from your environment.
> 
> Without actually trying it, I think that will do it.
> 
> –  
> – Jim W.

Jim, Many thanks for the suggestion, that worked for me.
