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
- Download and install GCC for Mac without Xcode
- Install brew
[code]sudo /Developer/Library/uninstall-devtools --mode=all[/code]
This will delete Xcode. For more details see John’s post
Currently 10.6 and 10.7 packages are available at https://github.com/kennethreitz/osx-gcc-installer/downloads
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
You can verify your success when you receive meaningful version by calling gcc --version and brew --version
Caution:
You don’t need Xcode for formulas like gradle, groovy, maven, tomcat etc. Nevertheless some formulas will require Xcode!

[...] 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 [...]
[...] 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. [...]