You can never, ever, just upgrade Xcode (or anything important, really) on a production Mac. Xcode, especially, needs to be installed on a sandbox machine first where it can destroy anything it wants. It's an effort, but still better than having production explode in your face.