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
2011/04/26
Thanks for that. I was about to just rm -rf the /Developer-old folder.
2011/04/26
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.
2011/06/13
Thanks
2011/07/21
Thanks man! this was awesome! loads of help
2011/08/31
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.
2011/08/31
It will break everything that has dependencies on Xcode 3.
2011/09/05
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.
2011/09/17
When I enter this in Terminal, I get error message “sudo: /Developer-old/Library/uninstall-devtools: command not found”
help?
2011/09/17
Sounds like you don’t have an old version of Xcode installed…
2011/09/29
Hi, if you look at the line Chris posted you might need to change “/Developer-old..” to “/Developer-3.2.6…”
Chris, thanks!
2012/02/09
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.