How to uninstall Xcode IDE without completely removing the dev tools
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.