Xcode 6.1 - 如何卸载命令行工具?

问题描述 投票:0回答:3

我通过发出

xcode-select --install
安装了 Xcode 命令行工具;现在我想卸载它(不卸载Xcode)。

我已经尝试过

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

但后来我收到错误

sudo: /Developer/Library/uninstall-devtools: command not found
xcode command-line-tool
3个回答
99
投票

如果您单独安装了命令行工具,请使用以下命令删除它们:

sudo rm -r /Library/Developer/CommandLineTools

55
投票

摘自苹果技术说明(感谢matthias-bauch

Xcode 包含所有命令行工具。如果它安装在您的 系统,remove它以卸载您的工具。

如果您的工具是从 Xcode 单独下载的,那么它们是 位于系统上的

/Library/Developer/CommandLineTools
删除 CommandLineTools 文件夹来卸载它们。

您可以轻松地使用终端删除

这里有一篇文章,解释了如何删除命令行工具,但执行此操作需要您自担风险。仅当上述任何方法不起作用时才尝试此操作。


7
投票

您只需删除此文件夹即可

/库/开发人员/CommandLineTools

请注意:这是根/Library,而不是用户的〜/Library)。

© www.soinside.com 2019 - 2024. All rights reserved.