Xcode – Uninstall Xcode 4.2.1 after installing 4.3.1

osx-lionuninstallationxcode

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?

Best Answer

Install Xcode 4.2.1 again and then uninstall it:

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