Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uninstall Xcode 4.2.1 after installing 4.3.1

I begrudgingly updated to Lion from snow leopard. I then updated XCode to 4.3.1 which as part of the update uninstalled 4.2 from snow leopard. I then realized that one of my other dev tools does not work with 4.3.1 at all, so I installed 4.2.1 along side it in the hopes of fixing things. It didn't. How do I remove 4.2.1 so I'm just left with 4.3.1? I tried deleting 4.3.1 and re-installing hoping it would detect 4.2.1 and remove it like it did when I first upgraded but no dice. Searching the web shows I need to run uninstall-devtools however I can't find it anywhere, /Developer doesn't exist... Trying to re-install 4.2.1 in the hopes there was an uninstaller buried in there says "Xcode install assistant can't be installed because xcode is already installed" (it didn't say this the first time obviously) so I can't re-install without 4.3.1 in place in the hopes of getting a /Developer folder... There appears to be no uninstall-devtools burried in 4.3.1 (and I have command line tools installed as well). I can't find 4.2.1, maybe it didn't install (I forgot to check disc capacities before/after) but then why can't I try to install it again without any xcode installed?

like image 453
ima747 Avatar asked Mar 10 '12 18:03

ima747


3 Answers

The versions of Xcode that support installation into /Applications instead of /Developer in theory support being removed just via dragging to the trash.

In practice, I'm not sure I trust the process, and I wish there was still a more robust cleanup script.

like image 44
radven Avatar answered Sep 19 '22 22:09

radven


Install Xcode 4.2.1 again and then uninstall it:

sudo /Developer/Library/uninstall-devtools --mode=all
like image 199
Valery Viktorovsky Avatar answered Sep 20 '22 22:09

Valery Viktorovsky


It turns out that 4.2.1's installer actually installs an Xcode installer into your applications folder, which in turn actually installs Xcode. The solution is find the installed installer (makes so much sense...) and install Xcode an things behave as expected.

like image 24
ima747 Avatar answered Sep 20 '22 22:09

ima747