Xcode 6.1 - 如何卸载命令行工具?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27438457/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode 6.1 - How to uninstall command line tools?
提问by TomNg
I installed Xcode command line tool by issuing xcode-select --install
; now I want to uninstall it (without uninstalling Xcode).
我通过发出xcode-select --install
;安装了 Xcode 命令行工具;现在我想卸载它(不卸载 Xcode)。
I've tried
我试过了
sudo /Developer/Library/uninstall-devtools --mode=all
but then I get the error
但后来我得到了错误
sudo: /Developer/Library/uninstall-devtools: command not found
回答by Aaron Brager
If you installed the command line tools separately, delete them using:
如果您单独安装了命令行工具,请使用以下命令删除它们:
sudo rm -rf /Library/Developer/CommandLineTools
回答by Durai Amuthan.H
An excerpt from an apple technical note(Thanks to matthias-bauch)
苹果技术说明摘录(感谢matthias-bauch)
Xcode includes all your command-line tools. If it is installed on your system, removeit 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 CommandLineToolsfolder to uninstall them.
Xcode 包含您所有的命令行工具。如果它已安装在您的系统上,请将其删除以卸载您的工具。
如果您的工具是从 Xcode 单独下载的,则它们位于
/Library/Developer/CommandLineTools
您的系统上。删除 CommandLineTools文件夹以卸载它们。
you could easily delete using terminal:
Here is an articlethat explains how to remove the command line tools but do it at your own risk.Try this only if any of the above doesn't work.
这是一篇文章,解释了如何删除命令行工具,但风险自负。仅当上述任何一项不起作用时才尝试此操作。
回答by MrDEV
You can simply delete this folder
您可以简单地删除此文件夹
/Library/Developer/CommandLineTools
/库/开发人员/命令行工具
Please note: This is the root /Library, not user's ~/Library).
请注意:这是根 /Library,而不是用户的 ~/Library)。