Oct 03 2008

How to Uninstall Xcode

Published by at 2:22 am under Xcode

  

A friend in San Francisco, Rodney Aiglstorfer, was recently jumping through hoops to get Xcode to cooperate with his iPhone. There’s nothing more aggravating than having your application running within the simulator and getting stuck downloading to a device.

At one point in the process he opted to remove the Xcode developer tools and start the configuration from the beginning. Which leads to the tip: should you ever find the need to remove Xcode, run the following from within a terminal window to make it happen:

sudo <Xcode>/Library/uninstall-devtools --mode=all

<Xcode> is the directory where the tools are installed. For typical installations the full path is /Developer/Library/uninstall-devtools

Easy enough, just make sure this is what you really intend to do as once it’s gone, it’s gone.

85 responses so far

85 Responses to “How to Uninstall Xcode”

  1. Matt Cassarinoon 20 Mar 2009 at 2:37 pm

    Thanks, this worked for me.

  2. Chatinon 03 Apr 2009 at 5:20 pm

    Thanks, my macbook got 2gb back :)

  3. Jakeon 08 Apr 2009 at 6:13 am

    Thanks, too bad Mac can’t have help as simple as this listed on their support page or in the uninstall instructions that come with the software!

  4. willon 11 Apr 2009 at 5:35 pm

    worked for me too, cheers..

  5. Marianoon 13 Jun 2009 at 10:43 am

    Worked GREAT!

  6. Ryanon 25 Jun 2009 at 9:41 pm

    Worked, thank you.

  7. Lexon 07 Jul 2009 at 2:34 pm

    Worked for me as well!

  8. Paulon 23 Jul 2009 at 8:14 am

    Brilliant. I was having trouble installing the latest iPhone SDK till I got rid of last Xcode install. Apple support said they were unable to replicate the issue!

  9. Anthonyon 03 Aug 2009 at 10:10 pm

    Thanks! I actually got my hard drive down to 0KB free. (Actually, it says “Zero KB” at that point) Cleaning off Xcode was perfect, and couldn’t have been easier.

  10. Garrett Winderon 11 Aug 2009 at 10:16 pm

    Well well, that was easy. Thanks so much!

  11. mongoleon 12 Aug 2009 at 1:53 am

    the documentation, about removing xcode is in the Developer folder as pdf file. There you can find exactly this command line ;-)

  12. Digital Aguaon 25 Aug 2009 at 12:50 pm

    mongole,

    The command line can be accessed with the Terminal Application.

    /Applications/Utilities/Terminal.app

  13. megaoyeon 30 Aug 2009 at 12:43 pm

    thank you so much!!!!

  14. jacksonon 01 Sep 2009 at 5:55 am

    hi Paul, i got problem installing SDK 3.0, keep saying file cannot mount, not recognized, can help?

  15. TY Limon 12 Sep 2009 at 9:59 am

    Cool! It Works for me! THANK YOU VERY MUCH!!! U’re the best!

  16. Carol J.V. Fisheron 27 Oct 2009 at 6:09 am

    I have the same problem as jackson; after a 10-hour download, it’s now saying “the following disk images failed to mount”… I’m trying to install XCode 3.1.2. Suggestions?
    Thanks…

  17. houmanon 28 Oct 2009 at 3:57 am

    Worked like a charm.
    Thanks mate, it was very helpful.

  18. Ryanon 13 Nov 2009 at 11:32 am

    Worked great. Thanks a ton. That’s 2 GB I’m happy to have back.

  19. padfooton 15 Nov 2009 at 8:34 am

    Thanks! A really good tip!

  20. gregmoraon 15 Nov 2009 at 10:30 pm

    Thanks =) I need to get rid of Xcode in order to install iPhone Dev (that also includes xcode)

  21. sebbrocheton 12 Dec 2009 at 9:56 am

    For me with XCode from Mac OS X 10.4 CD pack, this is the one to call:
    sudo /Developer/Tools/uninstall-devtools.pl –mode-all

    IMPORTANT: If you are going to install a previous version of the
    Developer Tools, be sure to restart the machine after installing.

  22. Tomon 08 Jan 2010 at 6:39 pm

    Worked great!!! Thanks

  23. Reed Olsenon 06 Feb 2010 at 11:05 pm

    Awesome – thanks!

  24. Erikon 11 Feb 2010 at 5:11 pm

    when i paste
    sudo /Developer/Library/uninstall-devtools –mode=all
    into a terminal window, it gives me this: “WARNING: Improper use of the sudo command could lead to data loss or the deletion of important system files. Please double-check your
    typing when using sudo. Type “man sudo” for more information.”

    then asks me for a password, but when i try to type, nothing happens- any ideas? I’m using 10.5.8 on a G5

  25. johnon 11 Feb 2010 at 5:13 pm

    Hi Erik,

    If you type the system/admin password, that should start the uninstall process.

  26. Erikon 11 Feb 2010 at 5:43 pm

    thanks, John- that worked- nothing visible happened when i typed, but it accepted the password and uninstalled xcode

  27. Jeffon 11 Feb 2010 at 11:19 pm

    I tried this (on 10.6.2) and got the following error message:

    ERROR: Can’t locate uninstaller script /Library/Developer/3.0/uninstall-devtools
    ERROR: Can’t locate uninstaller script /Library/Developer/Shared/uninstall-devtools
    Can’t determine system version.

    Any suggestions?

  28. Asharon 13 Feb 2010 at 12:42 pm

    Thanks!

  29. Rickyon 17 Mar 2010 at 5:32 am

    Thanks!! i got 2 GB back from my macbook pro!

  30. meon 19 Mar 2010 at 6:31 pm

    thanks

  31. markdudeon 30 Mar 2010 at 7:37 pm

    I feel necessity to thank you also, just before i use this command, because I know it will work. You are the Chuck Norris of xcode.

  32. Miss Blakeon 02 Apr 2010 at 7:10 pm

    Jeff, I’m with you on that! Same system, same error. Somebody help?

  33. Pocjocon 09 Apr 2010 at 8:19 am

    Thanks!

  34. Brendanon 15 Apr 2010 at 12:06 am

    Thanks man. This worked perfectly.

  35. Rossion 18 Apr 2010 at 2:53 pm

    Thanks so much for this.. i downloaded this program unaware of what it was and regretted it when i did.. thanks for this!

  36. Michaelon 06 May 2010 at 11:26 am

    This works but I have multiple installations of XCode (various beta’s along the way). How do I remove specific installations and leave the latest?

  37. Timon 27 May 2010 at 12:22 pm

    Thanks worked great

  38. bobbyon 01 Jul 2010 at 9:12 am

    I downloaded the xcode 3.2.3 because I was start learning C on the Mac. The problem was that the book I was using used xcode 3.1 and I’m a beginner so I got confused when it wanted to use the standard tool from the command line utlility since that format isn’t available in the 3.2.3
    So I copy and pasted that line into the terminal and from what I assume, it got rid of xcode cause I couldn’t find it. I didn’t restart the computer and just reinstalled the xcode 3.2.3 and nothing changed only this time when I tried to get rid of it the same before, it said that there is no such file or directory

    what should I do??

  39. BanyanTreeon 30 Jul 2010 at 4:59 pm

    thanks.

  40. Michaelon 03 Sep 2010 at 1:16 pm

    I have the very same issue as Jeff. I have Mac OSX 10.5.7
    From System Profiler:
    Model Name: MacBook Pro
    Model Identifier: MacBookPro4,1
    Processor Name: Intel Core 2 Duo
    Processor Speed: 2.4 GHz
    Developer Information:
    Version: No version information available
    Location: /Developer
    Applications:
    Xcode: 3.0 (921)
    Interface Builder: 3.0 (629)
    Instruments: 1.0 (72)
    Dashcode: 1.0 (114)

    Jeff–Did you solve it?

    # Jeffon 11 Feb 2010 at 11:19 pm
    I tried this (on 10.6.2) and got the following error message:
    ERROR: Can’t locate uninstaller script /Library/Developer/3.0/uninstall-devtools
    ERROR: Can’t locate uninstaller script /Library/Developer/Shared/uninstall-devtools
    Can’t determine system version.
    Any suggestions?

    Does anyone else have a solution?

  41. Puneeton 16 Sep 2010 at 12:49 am

    Nice posting. Helped me get my mac back on its feet.

  42. dazon 22 Oct 2010 at 11:16 pm

    find / -type f -name “uninstall-devtools”

  43. stulleon 23 Oct 2010 at 7:57 am

    Thanks!!!

  44. Bumpkinon 24 Oct 2010 at 1:19 pm

    Thanks, worked nice for the latest XCode, 7GB is back!

  45. Augustoon 29 Oct 2010 at 1:30 am

    +1 Thanks! :D

  46. Anonymouson 01 Nov 2010 at 2:32 pm

    The basic concept is to locate the uninstall file in the developer folder. Use “sudo” then “the uninstall file location” then add ” –mode=all”

  47. gadon 02 Nov 2010 at 2:36 pm

    Thanks for the solution.

  48. pson 13 Nov 2010 at 1:22 am

    Thanks!

  49. G-retton 21 Nov 2010 at 1:34 pm

    When I type:

    sudo /Library/uninstall-devtools –mode=all

    in the terminal window I get the following response:

    -bash: Xcode: No such file or directory

    The problem I’ve been having is that the iPhone simulator will open then cease to respond to the point where I have to force quit the application. I figure the best way to resolve this problem is to uninstall the entire developer folder and then reinstall it. I’ve tried just reinstalling it and the installation fails each time.

    Any advice, tips or even wild suggestions are VERY much appreciated. So far the three different apple support representatives I’ve spoken with haven’t been able to give me an answer. Apparently there is no documentation of this problem. So glad I was chosen to be the pioneer.

    Thanks for listening to my rant.

  50. G-retton 22 Nov 2010 at 12:45 am

    Okay so I managed to solve the uninstall problem. It was simply a matter of taking into account that the xcode application was in my developer folder.

    However, the second problem still stands. After I downloaded Xcode and iOS SDK 4.1 it told me the installation failed. When I went to go check the developer folder it had in fact installed. Then I opened Xcode to find the same problem with the iPhone simulator. When I would try to run it, it would simply stop responding and I would have to force quit it.

    ANY advice is welcome. Thanks in advance.

  51. Lee Cravenon 05 Feb 2011 at 8:41 pm

    Nice info I knew I’d seen this before and upon looking inside the developer library folder there is a script in there, which runs the following:

    sudo /Developer/Library/uninstall-devtools

    Thanks for this though – had me looking.

  52. JoVoon 11 Feb 2011 at 4:16 am

    i tried to install Xcode twice, and both times it failed. so, i thought i should uninstall and then try to reinstall. when i tried, i got the following:

    twolove:~ jovo$ sudo /Library/Developer/Shared/uninstall-devtools –mode-all
    Password:
    Unknown option: mode-all
    Can’t determine system version.
    twolove:~ jovo$

    any thoughts?

  53. Matton 05 Mar 2011 at 6:27 pm

    i get “no such file or directory” when putting this into terminal … any ideas?

  54. lucioferon 05 Mar 2011 at 8:37 pm

    JoVo you are clearly using wrong syntax, its –mode=all
    It works like a charm
    Cheers

  55. ggracon 09 Mar 2011 at 9:11 pm

    Great!

    Works fine!

    Thanks!

  56. Noamon 12 Mar 2011 at 2:59 am

    Thanks

  57. rfson 16 Mar 2011 at 9:19 am

    JoVo: It’s two dashes, not one. So “–mode” not “-mode”.

  58. JoVoon 17 Mar 2011 at 4:31 am

    ah, thank you ;)

  59. Charlie Morganon 31 Mar 2011 at 7:04 pm

    Thanks. I have run this now several times, apparently successfully. However I still keep getting Xcode coming up in the possible software updates dialogue. Is this just simply going to always happen? I am not convinced everything has been removed from my HD

  60. Russellon 05 Apr 2011 at 2:31 pm

    worked for me. Thanks!

  61. Gabriel Acevedoon 10 Apr 2011 at 12:09 pm

    Worked for me too. Thank you very much!

  62. Subwa Dioon 12 Apr 2011 at 4:51 pm

    sudo /Developer/Library/uninstall-developer-folder
    worked best for me. get a completely clean slate.

  63. Eriqueon 19 May 2011 at 3:59 am

    Subwa Dio:

    That does not uninstall all of the tools, only what’s in ‘/Developer’.

    In fact ‘uninstall-developer-folder’ is invoked as part of ‘uninstall-devtools –mode=all’. (Read the scripts and see for yourself.)

  64. eyeguyon 21 May 2011 at 9:19 pm

    worked for me! Thanks!

  65. Binu Paulon 30 May 2011 at 2:12 am

    Perfect …….It works like a 100% success .U are greateeeee

  66. Ashwanion 20 Jul 2011 at 6:08 am

    Thanks!

  67. hestersuon 20 Jul 2011 at 7:02 pm

    Ran the script but I still have a /developer directory with a variety of subdirectories. Can these be deleted or should I leave them alone? TIA

  68. juan davidon 22 Jul 2011 at 6:30 pm

    It works for OSX Lion too, thanks a lot

  69. pratikon 27 Jul 2011 at 7:59 pm

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

  70. Lorenaon 10 Aug 2011 at 7:44 am

    Cheers John, it worked pretty well for me.

  71. Joseon 17 Aug 2011 at 7:11 pm

    Thanks, worked nice for the latest XCode

  72. Kyriacoson 28 Aug 2011 at 12:59 am

    Thanks for the instructions, Fixed!

  73. Felipe S. Gomeson 16 Sep 2011 at 5:48 pm

    Thank you. Worked for me: MacPro Intel with Lion :)

  74. Geoffon 16 Oct 2011 at 8:19 am

    Thanks! worked for me too! :)

  75. Rick Con 30 Oct 2011 at 2:08 pm

    Thanks for the tip. It freed up quite a bit of space on this drive space constrained MBAir. All that appears to be left under Developer is some documentation folders. If I wanted to reinstall, would reinstalling Lion reinstall devtools?

  76. Nashville Web Designon 01 Nov 2011 at 10:24 am

    On my Mac, I’m running 10.7.2 and the correct command is: sudo /Xcode3.1.4/Library/uninstall-devtools. (All One Line)

    To find it, I went to the Finder, selected my computer, choose Macintosh HD and navigated to the Xcode3.1.4 folder. From there, inside the Library/ directory, I saw the uninstall script. I double clicked it to run and it said I needed to use the ‘sudo’ command like you have above. I retried it with the sudo command and I’m uninstalling as we speak.

  77. Anonymouson 13 Nov 2011 at 12:39 pm

    I did the ‘find’ command listed above it was /Library/Developer/3.2/uninstall-devtools etc…

  78. Kaion 21 Nov 2011 at 9:38 pm

    I am using Lion 7.2 + Xcode 4.2, and found the correct command should be
    sudo /Developer/Library/uninstall-devtools

  79. hzizhon 12 Dec 2011 at 7:20 pm

    thanks a lot
    it is useful

  80. methanoon 23 Dec 2011 at 10:27 am

    I have had Xcode 3.2 on my machine for a while. I’m trying to install it and all the other Dev stuff. None of this works. I don’t seem to have the unintall-devtools script on my machine. Can I get it from somewhere? Any other ideas.

  81. j.pon 05 Jan 2012 at 1:14 am

    Hey , I see it worked for everybody … but not for me ..
    i copied the line into the terminal but its says that there is no such directory ? can you help me ?
    i just got my mac so i dont know much about it

  82. Jakeon 06 Jan 2012 at 9:00 pm

    JP, when it says , you have to replace that with the path in which you installed Xcode. As it says the line below that, that is usually Developer. So try this code: sudo /Developer/Library/uninstall-devtools –mode=all

  83. Paulon 15 Feb 2012 at 10:01 am

    A quick, simple and well explained solution. Thanks!

  84. Silviuon 04 Mar 2012 at 10:30 am

    Worked like a charm!
    Thanks

  85. Jasonon 24 May 2012 at 7:24 pm

    I am running 10.7.3. Xcode 3.0 came installed in /Developer/Library. I recently tried to install Xcode 4.3 from the app store. It installed in /Applications. Now, I try to install MacPorts, which installs successfully. When I try to run it, I get the following message:

    Error: The installed version of Xcode (3.0) is too old to use on the installed OS version. Version 4.1 or later is recommended on Mac OS X 10.7.

    The problem is that it is looking in the /Developer/Library for Xcode and finds the older version. I have tried to uninstall Xcode 3.0 with

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

    and I get the following error:

    Can’t determine system version.
    Can’t determine system version.
    Can’t determine system version.

    Can anyone help? I have been struggling with this for months now. Thanks in advance!