Jun 21

I hit a really odd bug last night. I mean, really, really odd. One of those bugs that keeps you up until 4am and you go to bed defeated. I came into the office today and had another engineer sit with me as I went through my code explaining what I was doing hoping that a second set eyes and another brain could bring some clarity.

No luck.

Everything looked good, but this very odd crash was still occurring. We were both scratching our heads. The weird part was that the program ran perfectly on the iPhone and in the simulator, as long as I didn’t have the debugger attached. The other engineer tried the build on his machine and everything worked as it should and he was able to run the Xcode debugger.

I decided to completely remove and reinstall Xcode and the iPhone SDK. Normally, you just drag a Mac application to the Trash Can and you’re good. Xcode is a little different. There’s a ton of different folders, tools, SDKs, simulators, etc scattered around the Hard Drive.

So how do you remove everything?

Fire up Terminal and type:

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

Type in your password and go grab a coffee. The Uninstall process takes quite a bit of time as it analyzes every package on your machine. However, it will find and remove all Xcode and iPhone SDK components. I highly recommend you to restart your Mac before re-installing Xcode.

Written by Terry Blanchard \\ tags: , , , ,

12 Responses to “How to Completely Uninstall Xcode”

  1. Aeshvarya Verma Says:

    That’s it. Only one line is required to remove the whole ‘mess’.

  2. Terry Blanchard Says:

    Yup. That’s it.

  3. Jeremias Says:

    Thanks, it worked for XCode 3 on a snow leopard 10.6.8

  4. Thomas Says:

    Thx, it’s worked on lion 10.7.1.

  5. Nils Says:

    Thx, works great on 10.7.2.

  6. Vlad Says:

    Hi,

    To uninstall the Xcode I entered the required “sudo” string , and the system asked me the password.I entered my Apple ID(password)-the system didn’t accept it. It looks like the system wants the administrator’s pasword.
    I’ve bought a used Macbook. How to get the password.

    What password have I to enter?

    Thank you.
    Vlad.

  7. Terry Blanchard Says:

    Hi Vlad,

    Yes, you do need to enter an, not the, administrators password. It’s not your Apple ID password. If you don’t know it, because you bought it used. You can reset it by rebooting with the OS X CD and reseting the admin password from there. Here’s an article on how to do that:

    http://www.askdavetaylor.com/how_do_i_reset_my_mac_os_x_admin_root_password.html

    Good luck!
    // Terry.

  8. ishwor Says:

    hi had a snow lepord and was using xcode 3 but recently i update to lion and was trying to unistall xcode 3 and intall 4 i got error message.
    once i type
    sudo /path/to/xcode/library/unistall-devtools–mode=all
    in the terminal it asked for password and when i enter the admin password it says command not found.
    can anyone help me please how to unistall xcode 3 on lion..

  9. Terry Blanchard Says:

    Hi Ishwor,

    It looks like you’ve typed the command incorrectly. Two things:

    1. You have “unistall” instead of “uninstall”
    2. There is a space between “devtools” and “-mode”

    Hope that helps!
    // Terry.

  10. Perry Huhta Says:

    I’m commenting to make you understand of the helpful discovery my wife’s girl developed reading yuor web blog. She mastered lots of details, which included how it is like to possess an excellent coaching mindset to have many more completely master various tortuous matters. You truly surpassed people’s desires. Many thanks for coming up with those warm and friendly, dependable, educational as well as easy tips about the topic to Sandra.

  11. pocket god apk Says:

    301 Moved Permanently I was suggested this web site by my cousin. I’m not sure whether this post is written by him as no one else know such detailed about my problem. You’re amazing! Thanks! your article about 301 Moved PermanentlyBest Regards Agata

  12. ulga prorodzinna 2013 Says:

    Hi would you mind stating which blog platform you’re working with? I’m planning
    to start my own blog in the near future but I’m having a hard time choosing between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your layout seems different then most blogs and I’m looking for something unique.
    P.S Apologies for being off-topic but I had to ask!

Leave a Reply