How to Uninstall Xcode

Fri, Oct 3

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.


Thanks, this worked for me.

by Matt Cassarino on Mar 20, 2009. Reply #

Thanks, my macbook got 2gb back :)

by Chatin on Apr 3, 2009. Reply #

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!

by Jake on Apr 8, 2009. Reply #

worked for me too, cheers..

by will on Apr 11, 2009. Reply #

Worked GREAT!

by Mariano on Jun 13, 2009. Reply #

Worked, thank you.

by Ryan on Jun 25, 2009. Reply #

Worked for me as well!

by Lex on Jul 7, 2009. Reply #

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!

by Paul on Jul 23, 2009. Reply #

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.

by Anthony on Aug 3, 2009. Reply #

Well well, that was easy. Thanks so much!

by Garrett Winder on Aug 11, 2009. Reply #

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

by mongole on Aug 12, 2009. Reply #


The command line can be accessed with the Terminal Application.


by Digital Agua on Aug 25, 2009. Reply #

thank you so much!!!!

by megaoye on Aug 30, 2009. Reply #

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

by jackson on Sep 1, 2009. Reply #

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

by TY Lim on Sep 12, 2009. Reply #

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?

by Carol J.V. Fisher on Oct 27, 2009. Reply #

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

by houman on Oct 28, 2009. Reply #

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

by Ryan on Nov 13, 2009. Reply #

Thanks! A really good tip!

by padfoot on Nov 15, 2009. Reply #

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

by gregmora on Nov 15, 2009. Reply #

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

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

by sebbrochet on Dec 12, 2009. Reply #

Worked great!!! Thanks

by Tom on Jan 8, 2010. Reply #

Awesome – thanks!

by Reed Olsen on Feb 6, 2010. Reply #

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

by Erik on Feb 11, 2010. Reply #

Hi Erik,

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

by john on Feb 11, 2010. Reply #

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

by Erik on Feb 11, 2010. Reply #

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?

by Jeff on Feb 11, 2010. Reply #


by Ashar on Feb 13, 2010. Reply #

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

by Ricky on Mar 17, 2010. Reply #


by me on Mar 19, 2010. Reply #

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.

by markdude on Mar 30, 2010. Reply #

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

by Miss Blake on Apr 2, 2010. Reply #


by Pocjoc on Apr 9, 2010. Reply #

Thanks man. This worked perfectly.

by Brendan on Apr 15, 2010. Reply #

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

by Rossi on Apr 18, 2010. Reply #

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?

by Michael on May 6, 2010. Reply #

Thanks worked great

by Tim on May 27, 2010. Reply #

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??

by bobby on Jul 1, 2010. Reply #


by BanyanTree on Jul 30, 2010. Reply #

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
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?

by Michael on Sep 3, 2010. Reply #

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

by Puneet on Sep 16, 2010. Reply #

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

by daz on Oct 22, 2010. Reply #


by stulle on Oct 23, 2010. Reply #

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

by Bumpkin on Oct 24, 2010. Reply #

+1 Thanks! :D

by Augusto on Oct 29, 2010. Reply #

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

by Anonymous on Nov 1, 2010. Reply #

Thanks for the solution.

by gad on Nov 2, 2010. Reply #


by ps on Nov 13, 2010. Reply #

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.

by G-rett on Nov 21, 2010. Reply #

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.

by G-rett on Nov 22, 2010. Reply #

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.

by Lee Craven on Feb 5, 2011. Reply #

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
Unknown option: mode-all
Can’t determine system version.
twolove:~ jovo$

any thoughts?

by JoVo on Feb 11, 2011. Reply #

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

by Matt on Mar 5, 2011. Reply #

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

by luciofer on Mar 5, 2011. Reply #


Works fine!


by ggrac on Mar 9, 2011. Reply #


by Noam on Mar 12, 2011. Reply #

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

by rfs on Mar 16, 2011. Reply #

ah, thank you ;)

by JoVo on Mar 17, 2011. Reply #

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

by Charlie Morgan on Mar 31, 2011. Reply #

worked for me. Thanks!

by Russell on Apr 5, 2011. Reply #

Worked for me too. Thank you very much!

by Gabriel Acevedo on Apr 10, 2011. Reply #

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

by Subwa Dio on Apr 12, 2011. Reply #

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.)

by Erique on May 19, 2011. Reply #

worked for me! Thanks!

by eyeguy on May 21, 2011. Reply #

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

by Binu Paul on May 30, 2011. Reply #


by Ashwani on Jul 20, 2011. Reply #

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

by hestersu on Jul 20, 2011. Reply #

It works for OSX Lion too, thanks a lot

by juan david on Jul 22, 2011. Reply #

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

by pratik on Jul 27, 2011. Reply #

Cheers John, it worked pretty well for me.

by Lorena on Aug 10, 2011. Reply #

Thanks, worked nice for the latest XCode

by Jose on Aug 17, 2011. Reply #

Thanks for the instructions, Fixed!

by Kyriacos on Aug 28, 2011. Reply #

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

by Felipe S. Gomes on Sep 16, 2011. Reply #

Thanks! worked for me too! :)

by Geoff on Oct 16, 2011. Reply #

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?

by Rick C on Oct 30, 2011. Reply #

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.

by Nashville Web Design on Nov 1, 2011. Reply #

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

by Anonymous on Nov 13, 2011. Reply #

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

by Kai on Nov 21, 2011. Reply #

thanks a lot
it is useful

by hzizh on Dec 12, 2011. Reply #

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.

by methano on Dec 23, 2011. Reply #

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

by j.p on Jan 5, 2012. Reply #

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

by Jake on Jan 6, 2012. Reply #

A quick, simple and well explained solution. Thanks!

by Paul on Feb 15, 2012. Reply #

Worked like a charm!

by Silviu on Mar 4, 2012. Reply #

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!

by Jason on May 24, 2012. Reply #


by Pedro Tardivo on Dec 31, 2013. Reply #

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>