16

Most rubyists might be shocked when they'll read this, but I'd like to know if it's possible to completely remove the Ruby framework as well as all the tools and gems that ship with Mac OS X 10.6.4.

Any help would be appreciated. (And explanations too if you think I'd rather not do this)

Thanks

just_a_dude
  • 475
  • 2
  • 4
  • 11
  • 2
    Just out of curiosity - why remove it? It's not exactly intrusive. Are you extremely short on disk space or something? – Matt Sep 29 '10 at 14:34
  • 1
    I'm in agreement with other posters. Unless you've extremely short on disk space, I'd leave it go. It's possible there may be some underlying dependency that could be broken if you remove Ruby. – JustXanny Sep 29 '10 at 15:48
  • 1
    If you mess with files in the /System/ directory, you deserve whatever evils befall you. Just don't do it. – ghoppe Sep 30 '10 at 17:59
  • 1
    It's easy to see what will be affected by removing the system Ruby. From the command-line type: `find /usr -type f -name \*.rb`. That will be one thing that is affected. Applications could expect ruby in `/usr/bin` also, and they will fail. In general, it's not a good idea to mess with executables in `/usr/bin`, `/sbin` or `/usr/sbin`. – TTM Nov 22 '11 at 23:32
  • @Greg You do realize that ruby files don't need a `.rb` extension? – Daniel Beck Dec 05 '11 at 18:53
  • Of course, but for this purpose it was sufficient. Beats trying to find all files with that extension, or that contain matches for all the tokens available in Ruby. – TTM Dec 05 '11 at 19:38

1 Answers1

13

Just delete /System/Library/Frameworks/Ruby.framework, /Library/Ruby, and erb, gem, irb, rdoc, ri, ruby, and testrb from /usr/bin.

Warning: OS X expects and sometimes relies on frameworks and software shipped with the system. It would be a very bad idea to remove the system Ruby. It might even get replaced next time you update OS X -- or it might not, but OS X might expect it to be there, and then bad things will happen. Remove it at your own risk. I am providing this answer because you asked, but I would not recommend removing a system framework.

Why do you want to remove it? It's not hurting anything to sit there, unused.

mipadi
  • 4,358
  • 1
  • 27
  • 27