How to uninstall Xcode 4.4 command line tools (Mac OS X 10.8 Mountain Lion)?
Asked Answered
M

4

13

This SO post explains very well how to install command line tools for Xcode 4.4.

But how to uninstall them?

Manfred answered 26/7, 2012 at 22:19 Comment(3)
Even without uninstalling them, you can probably do xcode-select and prefix all build commands with xcrun to use a different version's command line tools. I don't know of an uninstaller (other than TimeMachine restore or manually hunting down files), but installing command line tools of a different Xcode will probably overwrite them.Acrylonitrile
/Applications/Developer/Xcode.app/Contents/Developer/usr shows all the command line tools it likely installed, if you want to manually remove them. I haven't yet found a .pkg file that looks like a tools installer.Acrylonitrile
Yeah, had exactly the same problem ... I haven't found a solution for this, yet. Initially, I wasn't able to install the command line tools from the Xcode -> Downloads, etc. so I've installed it by downloading it as a separate package and now Xcode can see it as being installed. So, I wanted to remove it and repeat the procedure (hoping that it was fixed - the installation using Xcode -> Downloads), but I can't.Sienkiewicz
C
18

There's a script listed on this page to do just that on Mountain Lion: http://www.cocoanetics.com/2012/07/you-dont-need-the-xcode-command-line-tools/

Copy the script into a text file.
Save it as remove_CLI_tools.sh
Open terminal and navigate to the folder where you saved the script.
Type: sh remove_CLI_tools.sh

I installed just the isolated command line tools (stand alone installer) without installing the Xcode application. So I ended up running the script twice, changing the variables at the top for each of the packages installed by the installer
(you can check which packages were installed by looking in the hidden "Packages" file of the .dmg image of the installer):
com.apple.pkg.DeveloperToolsCLI.bom and .plist com.apple.pkg.DevSDK.bom and .plist

Be careful (have a backup, like the post recommends).

Curran answered 2/11, 2012 at 16:33 Comment(1)
worked fine but after running the script, xcode-select and xcodebuild are still available—why is that?Quarterly
S
0

sudo /Developer/Library/uninstall-devtools –mode=all works for 10.8.5

Statfarad answered 22/10, 2013 at 14:2 Comment(0)
D
-1

This should still work to remove xcode.

sudo /Developer/Library/uninstall-devtools –mode=all
Deponent answered 6/9, 2012 at 21:30 Comment(3)
/Developer doesn't exist in OSX 10.8Manfred
i'm running 10.8.2 and i have this directory and script.Translate
I'm on 10.8.4 and also have this directory. This command worked for me. Thanks!Billet
Z
-2

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

Zolnay answered 16/9, 2012 at 0:55 Comment(1)
/Library/Developer/Shared/uninstall-devtools doesn't exist in Mountain Lion.Nominative

© 2022 - 2024 — McMap. All rights reserved.