我怎样才能真正卸载 Xcode?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11530454/
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
How can I actually uninstall Xcode?
提问by JVC
I'm having issues with Xcode and trying to install Homebrew, so I decided to just uninstall Xcode and start fresh. However NONE of the uninstall methods I have found anywhere online, work.
我在使用 Xcode 时遇到问题并尝试安装 Homebrew,所以我决定卸载 Xcode 并重新开始。但是,我在网上找到的任何卸载方法都无效。
For starters, I installed via the App Store, for whatever that's worth. It seems to mean some things are different from those who did not.
首先,我是通过 App Store 安装的,无论值多少钱。这似乎意味着有些事情与那些没有的不同。
Next, I have no /Developer
directory, so ANYTHING that wants me to run something starting with a /Developer
path will not work.
接下来,我没有/Developer
目录,所以任何想要我运行以/Developer
路径开头的东西的东西都不起作用。
There is no /Library/Developer/Shared/uninstall-devtools
so executing that will always fail.
没有任何/Library/Developer/Shared/uninstall-devtools
执行总是会失败的。
Deleting the Xcode.app from my Applications folder and emptying trash, doesn't appear to have done anything except remove the actual application itself, the App store still thinks it's installed. I still can't install Homebrew.
从我的应用程序文件夹中删除 Xcode.app 并清空垃圾箱,除了删除实际应用程序本身之外似乎没有做任何事情,App Store 仍然认为它已安装。我仍然无法安装 Homebrew。
How on earth can I actually succeed in uninstalling this thing?
我到底怎么才能真正成功卸载这个东西?
EDIT: Does nobody know how to uninstall the App store version of Xcode so that I can reinstall it? =(
编辑:没有人知道如何卸载 Xcode 的 App Store 版本以便我可以重新安装它吗?=(
采纳答案by JVC
Finally found the solution to reinstalling XCode. Although I had deleted it from my primary Applications folder, I had a secondary System installed on an external drive, and XCode was present there. Removing it from the Applications folder on THAT drive - even though I was not booted from it - allowed me to reinstall XCode from the app store.
终于找到了重新安装XCode的解决方案。尽管我已将其从主应用程序文件夹中删除,但我在外部驱动器上安装了辅助系统,并且其中存在 XCode。从那个驱动器上的应用程序文件夹中删除它 - 即使我没有从它启动 - 允许我从应用商店重新安装 XCode。
回答by Tim
Drag Xcode.app into the trash. That's really about it. Bin your /Developer
directory too (if you have one from an old Xcode install.)
将 Xcode.app 拖入垃圾箱。真的是这样。也将您的/Developer
目录打包(如果您有一个来自旧 Xcode 安装的目录。)
The /Developer
directory is now in /Applications/Xcode.app/Contents/Developer
. The app package now contains everything.
该/Developer
目录现在位于/Applications/Xcode.app/Contents/Developer
. 应用程序包现在包含所有内容。
...Everything, that is, except the command line tools, which you might well need. These can be installed from within Xcode (Preferences->Downloads->Components tab.) Instruments (and other developer tools) are now launched through the Xcode main menu (Open Developer Tool) rather than loading directly from Finder.
...一切,也就是说,除了您可能需要的命令行工具。这些可以从 Xcode 中安装(首选项 -> 下载 -> 组件选项卡。)仪器(和其他开发人员工具)现在通过 Xcode 主菜单(打开开发人员工具)启动,而不是直接从 Finder 加载。
回答by Can Berk Güder
You need to install the command line tools (through Xcode Preferences) to be able to install Homebrew.
您需要安装命令行工具(通过 Xcode 首选项)才能安装 Homebrew。
Xcode doesn't create a /Developer
folder anymore, whether you install it through the App Store or not. This shouldn't (and doesn't) cause a problem with Homebrew.
Xcode 不再创建/Developer
文件夹,无论您是否通过 App Store 安装它。这不应该(也不会)导致 Homebrew 出现问题。
回答by MB_iOSDeveloper
This solution worked for me:
这个解决方案对我有用:
Find the shortcut for Xcode (desktop,Dock etc.)
找到 Xcode 的快捷方式(桌面、Dock 等)
Go to: "Options" and then to "Show in Finder"
转到:“选项”,然后“在 Finder 中显示”
The file you are now looking should be named:"Xcode.app". This is the file you need to delete.
您现在正在查找的文件应命名为:“Xcode.app”。这是您需要删除的文件。
Now move this file (drag & drop) into the trash*. *If you try to run Xcode it will tell you that it can′t be run because its in the trash.
现在将此文件(拖放)移入垃圾箱*。*如果您尝试运行 Xcode,它会告诉您它无法运行,因为它在垃圾箱中。
Empty the trash*. *This proces took me some time since Xcode is around 1.8 Gb in size
清空垃圾*。*这个过程花了我一些时间,因为 Xcode 的大小约为 1.8 Gb
Restart your Mac.
重新启动您的 Mac。
Go to the App store (the shortcut is located at the Dock -- Launchpad When you open AS you will find Xcode under the "Developer Tools". There the AS let me only install it. It installed Xcode by automatically downloading it and installing.
进入App Store(快捷方式位于Dock--Launchpad 当你打开AS时,你会在“开发者工具”下找到Xcode。那里AS让我只安装它。它通过自动下载和安装来安装Xcode。
All errors and problems (I had) were gone after the reinstallation. This solution worked for : Xcode 5.0.1 on Mac mini, Mac OS X 10.9.1. Other solutions considering sudo commands did not work for me. I don′t know how Xcode 5 was installed. Xcode was located in the Applications folder.
重新安装后,所有错误和问题(我有)都消失了。此解决方案适用于:Mac mini 上的 Xcode 5.0.1、Mac OS X 10.9.1。考虑 sudo 命令的其他解决方案对我不起作用。我不知道 Xcode 5 是如何安装的。Xcode 位于 Applications 文件夹中。