我可以安全地删除 Xcode Derived 数据文件夹的内容吗? [英] Can I safely delete contents of Xcode Derived data folder?

查看:65
本文介绍了我可以安全地删除 Xcode Derived 数据文件夹的内容吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的磁盘空间不足,并通过第三方实用程序检查,其中 ~/Library/Developer/Xcode/DerivedData 目录占用了大约 22GB 的磁盘空间.

我搜索了stackoverflow并找到了这篇文章

您可以找到项目列表,您可以进入DerivedData文件夹,也可以直接删除单个项目的DerivedData

<小时>

我不在 Xcode5 上工作,但在 4.6.3 中,您可以找到 DerivedData 文件夹,如下图所示:

点击首选项后..

你得到这个窗口

I am running low on disk space and checked through a third party utility that among other things that ~/Library/Developer/Xcode/DerivedData directory is taking about 22GB of disk space.

I searched stackoverflow and found this post

How can I safely delete in my ~/Library/Developer/Xcode/DerivedData directory?

The accepted answer to this question suggests that I should not touch / remove folders from this directory. so what I did was

  • Found an existing build project folder for an app that I have available on Appstore
  • Deleted the folder from derived dir
  • launched XCode 5
  • Open that project
  • Clean Build
  • Tested and compiled it on a simulator
  • ReArchived
  • Everything worked. Nothing was broken.

Unless I missed something in that posts answer I want to make sure by asking experienced developers that if I delete all the folders from DerivedData it will not hurt me in building, testing and compiling those projects.

解决方案

Yes, you can delete all files from DerivedData sub-folder (Not DerivedData Folder) directly.

That will not affect your project work. Contents of DerivedData folder is generated during the build time and you can delete them if you want. It's not an issue.

The contents of DerivedData will be recreated when you build your projects again.

Xcode8+ Update

From the Xcode8 that removed project option from the window tab so you can still use first way:

Xcode -> Preferences -> location -> click on small arrow button as i explain in my first answer.

Xcode7.3 Update For remove particular project's DeriveData you just need to follow the following steps:

Go to Window -> Project:

You can find the list of project and you can either go the DerivedData Folder or you can direct delete individual Project's DerivedData


I am not working on Xcode5 but in 4.6.3 you can find DerivedData folder as found in the below image:

After clicking on Preferences..

You get this window

这篇关于我可以安全地删除 Xcode Derived 数据文件夹的内容吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆