Sep 10

Homebrew is my favorite package manager. If you installed Xcode just for brew than this post might be interesting for you.

Kenneth Reitz created a GCC Installer for OSX without Xcode! Thank you. This package is about 500 MB. Compared to Xcode you save at least 1,5 GB on your SSD.

So let’s go to work:

  • Remove Xcode
  • sudo /Developer/Library/uninstall-devtools --mode=all

    This will delete Xcode. For more details see John’s post

  • Download and install GCC for Mac without Xcode
  • Currently 10.6 and 10.7 packages are available at

  • Install brew (see
  • /usr/bin/ruby <(curl -fsSkL
  • You're done
  • You can verify your success with brew doctor.

You don't need Xcode for formulas like gradle, groovy, maven, tomcat etc. Nevertheless some formulas will require Xcode!

15 Responses to “Homebrew without Xcode – save 1,5 GB!”

  1. [...] For both you need Xcode to be installed:( UPDATE: At least for Homebrew this is no longer true – see Homebrew without Xcode – save 1.5 GB [...]

  2. [...] If it is a MacOSX machine, download and install XCode. Note that Xcode is quite huge. If you wanted a slightly less bandwidth-demanding solution, try this. [...]

  3. stephen says:

    the brew url has changed:

    /usr/bin/ruby -e “$(/usr/bin/curl -fksSL”

  4. Mike Gifford says:

    Best to just work from –

    Both the URL’s provided above are bust.

  5. D. Simms says:

    And if you had brew installed and then removed Xcode and installed one of John’s package’s, “brew doctor” is the thing to run.

  6. No Longer Needed says:

    No Longer Needed provided your using Lion or Mountain Lion. Apple provides “Command Line Tools” which you can download and install without installing the rest of the xcode suite. This requires a FREE Apple Developer account (login with your Apple ID).

  7. leif.hanack says:

    Thank you for this tip.

  8. I thought it is impossible to install HOMEBREW without Xcode (unfortunately I had to upgrade Lion from Leopard to get Xcode from apple store

    Thanks a lot for your help. Much appreciated

  9. E.fatnev says:

    Now in apple site we have a command line xcode( 200 mb), thank you but now it not needed)

  10. [...] 之前听同事说要使用 gcc 等编译工具要安装 xcode,vpn 到美国,下下来一看,3.5G,吓尿了,这么大的文件最近一次看到还是高中在 windows 上下游戏文件看到的,我能容忍的源文件的最大不要超过 100M,况且我在 Linux 上看到的绝大多数的源文件都在 10M 以内。后来发现只要下载一个 Command Line Tools for Xcode 就可以了,应该是 xcode 的一部分(1, 2)。 [...]

  11. [...] If it is a MacOSX machine, download and install XCode. Note that Xcode is quite huge. If you wanted a slightly less bandwidth-demanding solution, try this. [...]

  12. John says:

    Finished installing Homebrew and GCC as given above. Now how do i start compiling C programs. Have no clue whatsoever. A few instructions will be much appreciated.

Leave a Reply

preload preload preload