I installed the Developer Tools way back in Tiger or Leopard and I'd like to uninstall them now. I have Xcode 4.0.2. How do I uninstall them manually?
Yes, simply run the following in Terminal:
sudo <Xcode>/Library/uninstall-devtools --mode=all
<Xcode> is the default installation of Xcode, typically:
sudo /Developer/Library/uninstall-devtools --mode=all
Based on your OP, I am assuming you are running pre-Lion Xcode. This is covered in the documentation that comes with the Developer Tools install:
Uninstalling Xcode Developer Tools
To uninstall Xcode developer tools on the boot volume along with the directory, from a Terminal window type:
$ sudo /Library/uninstall-devtools --mode=all
To remove the underlying developer content on the boot volume, but leave the directory and supporting files untouched, from a Terminal window type: $ sudo /Library/uninstall-devtools -- mode=systemsupport To just remove the UNIX development support on the boot volume, but leave the directory and supporting files untouched, from a Terminal window type:
$ sudo /Library/uninstall-devtools --mode=unixdev
Finally, to just uninstall the directory you can simply drag it to the trash, or from a Terminal window type:
$ sudo /Library/uninstall-devtools --mode=xcodedir
NOTE: The uninstaller that ships with previous versions of the Xcode developer tools will not clean everything off of your system properly. You should use the one installed with these Xcode developer tools.
Pleae super-double check that this documentation either exists with your installation or is the same as your installation before you act. As with any such commands, precision and compatibility are critical.
It looks like you just have to remove the
/Developer folder (especially if you have already installed version 4.3 or later of Xcode). The Xcode section of the Apple Developer Support Center actually tells you to do this (emphasis mine).
I've installed the latest version of Xcode from the Mac App Store, but a previous version of Xcode (4.2.1 or earlier) keeps launching. What should I do?
To run the latest version of Xcode, make sure you are launching Xcode.app from the Applications folder. Xcode 4.3 and later is packaged on the Mac App Store as a single application and installs in your Applications folder as Xcode.app.
Previous versions of Xcode placed the tools and frameworks in the Developer folder. You can delete the older version of Xcode by dragging the Developer folder to the trash.
This is reiterated in New Features in Xcode 4.3 (emphasis mine).
The simplification afforded by repackaging Xcode 4.3 as a single app bundle eliminates the need for the
/Developerdirectory containing prior versions of Xcode. As a result, the Install Xcode application and the
uninstall-devtoolscommand line script are also no longer needed.
Note: The first time you run Xcode 4.3, you are prompted with a dialog to delete the Install Xcode application from the Applications directory if one is resident, and to remove any older installation of Xcode (Figure 4). These actions are optional, Xcode 4.3 can co-exist with older installations of Xcode on the same Mac. Some operations may require an administrator password to enable them if you switch from one version of Xcode to another.
Figure 4 Option to remove older versions of Xcode
If you choose not to delete these items on the first launch of Xcode 4.3, you can remove the
/Developerfolder and the Install Xcode application by dragging them to the Trash at any time.