我的 Xcode 安装占用了大量空间;如何减少模拟器占用的空间?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/31475782/
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
My Xcode installation is taking up loads of space; how to reduce space used by simulators?
提问by Mark Bridges
So my computer is the base model MacBook Pro so hard drive space is a premium.
所以我的电脑是基本型号的 MacBook Pro,所以硬盘空间很宝贵。
I've been looking through folders to find what's taking up all the space and my UserName/Library/Developer
folder was 30GB. This folder contains Xcode
& CoreSimulator
.
我一直在查看文件夹以查找占用所有空间的内容,而我的UserName/Library/Developer
文件夹是 30GB。此文件夹包含Xcode
& CoreSimulator
。
I've gone and deleted most of my archived projects and that's reduced the size down to 20GB in total with 18GB in the Xcode folder, but this still seems large.
我已经删除并删除了我的大部分存档项目,这将 Xcode 文件夹中的大小总共减少到 20GB,但是这看起来仍然很大。
I haven't got any of the simulators installed, except for the current 8.4 simulator, yet I seem to have a folder for each simulator in the iOS DeviceSupport subfolder of Xcode.
我没有安装任何模拟器,除了当前的 8.4 模拟器,但我似乎在 Xcode 的 iOS DeviceSupport 子文件夹中为每个模拟器都有一个文件夹。
Can someone tell me if their Xcode folder is a similar size and if I should expect all of the simulators to be included in this folder, even if they aren't visibly available in Xcode? Is it safe for me to delete all of these unused simulators?
有人能告诉我他们的 Xcode 文件夹是否具有相似的大小,以及我是否应该期望所有模拟器都包含在此文件夹中,即使它们在 Xcode 中不可见?删除所有这些未使用的模拟器对我来说安全吗?
采纳答案by Antzi
Yes, it is safe to remove all the simulators.
是的,删除所有模拟器是安全的。
Your best option is probably just to install again Xcode, this way you could just sudo rm -rf /Library/Developer
and rm -rf ~/Library/Developer
then install again everything (a simple download that is.)
最好的选择是可能只是重新安装的Xcode,这样你可以只sudo rm -rf /Library/Developer
和rm -rf ~/Library/Developer
然后重新安装所有(一个简单的下载软件,。)
回答by Mark Bridges
Just found out you can run the following command in terminal to delete unused simulators and free up some space:
刚刚发现您可以在终端中运行以下命令来删除未使用的模拟器并释放一些空间:
xcrun simctl delete unavailable