通过 App Store 安装时卸载 Xcode 4

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5344226/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 03:47:22  来源:igfitidea点击:

Uninstall Xcode 4 when it was installed via the App Store

xcodexcode4uninstall

提问by Mike Lawrence

I understand that those who installed Xcode 4 via the developer site are able to uninstall via /Developer/Library/uninstall-devtools –mode=all, however I installed via the App store and there doesn't seem to be an executable with the word "uninstall" in the name anywhere in the Developer folder at all. Any suggestions on how I should go about uninstalling Xcode 4?

我知道那些通过开发人员网站安装 Xcode 4 的人可以通过 卸载/Developer/Library/uninstall-devtools –mode=all,但是我是通过 App Store 安装的,并且在 Developer 文件夹中的任何位置似乎都没有名称中带有“卸载”字样的可执行文件全部。关于我应该如何卸载 Xcode 4 的任何建议?

采纳答案by iTux

This help for Xcode before MAS install /Library/Developer/Shared/uninstall-devtools

MAS 安装前 Xcode 的此帮助 /Library/Developer/Shared/uninstall-devtools

If you install it from MAS you can remove from launchpad, but also need to remove some folders** and files created by this app, you can use some helper application that found this files and safely remove it :)

如果您从 MAS 安装它,您可以从启动板中删除,但还需要删除一些文件夹**和此应用程序创建的文件,您可以使用一些找到此文件的帮助应用程序并安全地将其删除:)

** ex.: ~/Library/Developer, ~/Library/Application Support/Xcode, ~/Library/iPhone Simulator, Logs and etc.

** 例如:~/Library/Developer、~/Library/Application Support/Xcode、~/Library/iPhone Simulator、Logs 等。

回答by Christer Nordvik

From the above comment, the correct way is to:

从上面的评论来看,正确的方法是:

  1. Run sudo /Developer/Library/uninstall-devtools –mode=all
  2. Delete "/Applications/Install Xcode" if you want the app store to allow you to reinstall it.
  1. 运行 sudo /Developer/Library/uninstall-devtools –mode=all
  2. 如果您希望应用商店允许您重新安装它,请删除“/Applications/Install Xcode”。

回答by suresh

If you have installed xcode from Mac App store, then you need to delete it from Launch pad. You can do this by locating xcode icon in launch pad, long click on the icon till it starts dancing. Then delete it and wait for a while till the xcode.app is deleted from /Application. If you manually delete xcode.app from /Application, App store will continue to think its installed and will not allow you to reinstall in future.

如果你已经从 Mac App Store 安装了 xcode,那么你需要从 Launch pad 中删除它。您可以通过在启动板中找到 xcode 图标来完成此操作,长按该图标直到它开始跳舞。然后删除它并等待一段时间,直到 xcode.app 从 /Application 中删除。如果您手动从 /Application 中删除 xcode.app,App store 将继续认为它已安装并且不允许您以后重新安装。

回答by Glamdring

You must uninstall first the

您必须先卸载

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

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

It might be something else in your particular case so maybe you can try

在您的特定情况下它可能是其他东西,所以也许您可以尝试

locate uninstall-devtoolsto find where the script is placed.

找到 uninstall-devtools以找到放置脚本的位置。

Then you can find the version you need of xcode from https://developer.apple.com/downloads/index.action

然后你可以从https://developer.apple.com/downloads/index.action找到你需要的 xcode 版本

IMPORTANT: If you are going to install a previous version of the Developer Tools, be sure to restart the machine after installing.

重要提示:如果您要安装以前版本的开发人员工具,请务必在安装后重新启动机器。

回答by fsharp

In our installs of xCode 4 from the App Store, we are able to use:

在我们从 App Store 安装 xCode 4 时,我们可以使用:

sudo /Developer/Library/uninstall-developer-folder