简体   繁体   English

如何卸载Xcode 4.4命令行工具(Mac OS X 10.8 Mountain Lion)?

[英]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. 这篇SO帖子很好地解释了如何为Xcode 4.4安装命令行工具。

But how to uninstall them? 但是如何卸载它们呢?

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/ 此页面上列出了一个脚本,用于在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 将其另存为remove_CLI_tools.sh
Open terminal and navigate to the folder where you saved the script. 打开终端并导航到保存脚本的文件夹。
Type: sh remove_CLI_tools.sh 键入: sh remove_CLI_tools.sh

I installed just the isolated command line tools (stand alone installer) without installing the Xcode application. 我没有安装Xcode应用程序,只安装了独立的命令行工具(独立安装程序)。 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): (您可以通过查看安装程序的.dmg映像的隐藏“Packages”文件来检查安装了哪些软件包):
com.apple.pkg.DeveloperToolsCLI.bom and .plist com.apple.pkg.DevSDK.bom and .plist com.apple.pkg.DeveloperToolsCLI.bom and .plist com.apple.pkg.DevSDK.bom and .plist

Be careful (have a backup, like the post recommends). 小心(有备份,如帖子推荐)。

sudo / Developer / Library / uninstall-devtools -mode = all适用于10.8.5

这仍然可以删除xcode。

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

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM