Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer

up vote 8 down vote accepted

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.

share|improve this answer
    
@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 '11 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. –  Philip Regan Mar 8 '11 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 '11 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). –  Global nomad Mar 8 '11 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 '11 at 16:10
show 4 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.