4

I need to reinstall Xcode. It seems that some of the installation did not work correctly and so I need to completely reinstall it.

Xcode is a pretty hefty piece of kit and so I was wondering how you go about completely uninstalling / reinstalling it?

Thanks

1 Answer 1

8

The Apple recommended way to uninstall and install Xcode is in the "Read Me" document that accompanies each release, which basically says launch the Terminal.app then (if you originally installed Xcode in the standard location) type

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

You'll be prompted for the superuser id which is generally the same password as the first (non-restricted) user registered on the Mac.

I would recommend you restart your Mac before installing (newer and older) Xcode again.

9
  • @nomad - I have performed the above, and it looks like it woked... however, I still have a /Developer folder which contains several subfolders and files, totalling around 65MB. Can I get rid of these files?
    – mrwooster
    Mar 8, 2011 at 13:16
  • @mrwooster: Do not get rid of anything in the Developer folder. That contains links to headers, frameworks, and system resources. The Developer folder is an all or nothing deal. Mar 8, 2011 at 13:43
  • But the /Developer folder is not present on a fresh OSX install? Or is it the remains of the tools that are still required by programs that I have installed since installing xcode?
    – mrwooster
    Mar 8, 2011 at 14:21
  • 1
    @mrwooster the remnants files in your /Developer is most likely because of the documentation downloaded when your Xcode periodically checks for update. So long as you didn't see any error messages performing the "sudo ..." (for e.g. error messages that suggested some links/files are missing), it's OK to Trash them (after you restart so that these libraries and frameworks are no longer in memory, else you can't empty trash). Mar 8, 2011 at 15:49
  • 2
    Dont worry, I wont forget to mark as answered ;)... I used the script that came with that XCode install, and have not installed any other versions.... there are still some files that are not documentation, but I would like to remove them, so going to do a time machine backup and then try deleting.... not ideal, but at least I can restore if it all goes tits up.
    – mrwooster
    Mar 8, 2011 at 16:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .