How to completely remove Ruby, Ruby gems on Mac OS X 10.6.4

71,384

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.

Share:
71,384

Related videos on Youtube

just_a_dude
Author by

just_a_dude

Updated on September 17, 2022

Comments

  • just_a_dude
    just_a_dude over 1 year

    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

    • Siqi Lin
      Siqi Lin over 13 years
      Just out of curiosity - why remove it? It's not exactly intrusive. Are you extremely short on disk space or something?
    • JustXanny
      JustXanny over 13 years
      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.
    • ghoppe
      ghoppe over 13 years
      If you mess with files in the /System/ directory, you deserve whatever evils befall you. Just don't do it.
    • TTM
      TTM over 12 years
      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.
    • HikeMike
      HikeMike over 12 years
      @Greg You do realize that ruby files don't need a .rb extension?
    • TTM
      TTM over 12 years
      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.
  • just_a_dude
    just_a_dude over 13 years
    Thanks guys, will not remove Ruby or Python :)
  • Vojto
    Vojto about 13 years
    I just removed it -- bundle from rvm would use site Ruby for some reason and this fixed it.