Network & Systems Architect

Welcome to my little blog. I am mostly techie over here, blogging about networking and system administration topics, but there will also be some Travel Reports from time to time…

How to Upgrade to Xcode4 (or uninstall Xcode3)

March 12, 2011Christian Kildau12 Comments

I recently bought Xcode 4 on the Mac AppStore and thereby thought I’d upgrade. Nope. Xcode 3 is moved to ‘/Developer-old’, but kept. No big dead actually, except when your OS Disk is only 60Gb. The new Xcode 4 uses almost 10Gb plust 5Gb for Xcode 3. So if you don’t need Xcode 3 anymore, just run:

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

This removes all Xcode3 files, freeing up about 5Gb of space.

This article has 12 comments
  1. Chris Mowforth

    Thanks for that. I was about to just rm -rf the /Developer-old folder.

  2. dcolumbus

    Thanks a lot! Even though I found this line somewhere else originally, sometimes it helps when it’s worded differently. Saved me a few gigs.

  3. David


  4. Hsiang

    Thanks man! this was awesome! loads of help

  5. Sam

    I ran that command, and it broke a bunch of command line stuff. I’m probably going to have to redownload the Xcode 4 installer to fix this.

    • Chris

      It will break everything that has dependencies on Xcode 3.

  6. Andrea

    Well, I followed the suggestion when upgrading from Xcode-3.2.6 to Xcode-4.1. But something went wrong: after issuing the command
    sudo /Developer-3.2.6/Library/uninstall-devtools –mode=all
    also Xcode-4.1 was broken: for instance, the make command disappeared, and in my App Store page the Xcode lists as not installed. Hopefully installing it again will fix the issue … I’ll know in a few hours, since I’ve to download it again.

  7. Nicholas

    When I enter this in Terminal, I get error message “sudo: /Developer-old/Library/uninstall-devtools: command not found”


    • Chris

      Sounds like you don’t have an old version of Xcode installed…

    • yann

      Hi, if you look at the line Chris posted you might need to change “/Developer-old..” to “/Developer-3.2.6…”

      Chris, thanks!

  8. Rob

    WARNING: I don’t think the above post gives the right advice. If you look at the script, or run it with the arguments –verbose and –do-nothing, you will see it removes files that are not specific to xcode 4, such as make, mentioned by Andrea.

    The About.pdf that comes with XCode 4 implies that running the uninstaller script with –mode=all will remove all files, and since 4 replaces some files instead of moves them, running –mode=all with the xcode 3 uninstaller script will remove files for 4.

    So you really check want to delete either the /Developer-old or /Developer-3.2.6 folder by dragging it to the trash, else you will have to reinstall XCode 4 and possibly redownload the 2GB installer like Nicholas! The author clearly did not try this before writing the article.

Leave a Reply

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.