Can I delete Xcode?

Solution 1:

Yes, you can, as long as you install the command line tools.

You can then install the command line tools with xcode-select --install

For more information (from the iOS Dev Library, but applicable in this case), see Technical Note TN2339