Uninstalling Xcode Developer Tools
To uninstall Xcode developer tools on the boot volume along with the <Xcode> directory, from a Terminal window type:
$ sudo <Xcode>/Library/uninstall-devtools --mode=all
To remove the underlying developer content on the boot volume, but leave the <Xcode> directory and supporting files untouched, from a Terminal window type:
$ sudo <Xcode>/Library/uninstall-devtools --mode=systemsupport
To just remove the UNIX development support on the boot volume, but leave the <Xcode> directory and supporting files untouched, from a Terminal window type:
$ sudo <Xcode>/Library/uninstall-devtools --mode=unixdev
Finally, to just uninstall the <Xcode> directory you can simply drag it to the trash, or from a Terminal window type:
$ sudo <Xcode>/Library/uninstall-devtools --mode=xcodedir