How to uninstall Xcode IDE without completely removing the dev tools

xcode

I wanted to enable the developer libraries in Mac (RoR, Perl, gcc etc.) so I installed Xcode 3.2. I am only interested in these command-line tools and will not be using Xcode (or other GUI tools with Mac and iPhone developer bells and whistles that are part of the SDK) at all, as I generally like to use a text editor and the command line.

How do I remove just those IDE tools while still keeping my programming environment intact? I'd rather reclaim the disk space.

Best Answer

As of recent releases of Xcode 4 you can now get the command-line tools as a separate download and installer - it's a much smaller download too: http://developer.apple.com/downloads.

You'll want to uninstall an existing Xcode install with the command:

$ sudo /Developer/Library/uninstall-devtools --mode=all

before installing the command-line only tools.