Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

But how to uninstall them?

like image 440
user456584 Avatar asked Jul 26 '12 22:07

user456584


People also ask

How do I uninstall Xcode command-line tools on Mac?

Xcode includes all your command-line tools. If it is installed on your system, remove it to uninstall your tools. If your tools were downloaded separately from Xcode, then they are located at /Library/Developer/CommandLineTools on your system. Delete the CommandLineTools folder to uninstall them.

How do I uninstall an older version of Xcode?

To uninstall newer versions of Xcode is much like deleting any other app from the Mac: Navigate to the /Applications/ folder and locate “Xcode” application. Drag “XCode” to the Trash and empty the trash as usual by right-clicking on the Trash icon and choosing 'Empty Trash'


1 Answers

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).

like image 176
creativecoder Avatar answered Nov 15 '22 21:11

creativecoder