Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

xcode

ios

xcode4

I'd like to remove old (replaceable?) data and DerivedData contents seem a likely candidate. Since it's name DerivedData, I assume that it's info that, if missing, would be generated during a build phase and if present, is used during that same phase. It seems logical then that I could delete any old project data without fear and if I should ever build that old project, the first time through would take longer than normal sine it has to recreate all this derived data.

Am I mistaken here?

like image 610
soob Avatar asked Sep 02 '11 04:09

soob


People also ask

Can I delete Xcode DerivedData library?

Now that Xcode is closed and our DerivedData folder is location is open in finder, we can delete the whole DerivedData folder. Once I have deleted the DerivedData folder I make sure to delete it from the trash as well. Normally I completely empty my trash folder, but you can just delete the DerivedData folder.

Is it safe to delete user data Xcode?

As it is user data, no big issue if you delete it completely but it's safer to use 'Reset Content and Settings' option from the menu to delete all of your app data in a Simulator.

How do I delete files in Xcode?

In Xcode 2.4, you select the file in the main project window and either press the delete/backspace button, or control-click and select Delete from the pop-up menu. It then asks if you want to delete the file and all references to it, or just the references, leaving the file still present in the project folder.


3 Answers

The Derived Data folder contains all the intermediate build information, debug- and release-built targets, as well as your project's index. It's helpful to delete the derived data when you have odd index problems (code completion not working right, constant re-indexing, or even just a slow project). Deleting the entire folder nukes this information for all projects Xcode 4 knows about.

The Archives folder (a sibling of Derived Data) contains the archived form of your targets. That is, a release build as well as dSYM data for later debugging. This you should not delete if you want to be able to debug deployed versions of your application.

You can nuke the derived data for a given project by opening the Organizer window and selecting the Projects tab. Select the desired project and click the Delete button next to the Derived Data path. This is more of a "surgical strike" for problem projects.

like image 166
Joshua Nozzi Avatar answered Oct 17 '22 05:10

Joshua Nozzi


The content of 'Derived Data' is generated during Build-time. You can delete it safely. Follow below steps for deleting 'Derived Data' :

  1. Select Xcode -> Preferences..

Step 1

  1. This will open pop-up window. Select 'Locations' tab. In Locations sub-tab you can see 'Derived Data' Click on arrow icon next to path.

Step 2

  1. This will open-up folder containing 'Derived Data' Right click and Delete folder.

Step 3

like image 39
Jayprakash Dubey Avatar answered Oct 17 '22 07:10

Jayprakash Dubey


Yes those data are generated during the build time and you can delete them if you want, its not a issue.

It will be recreated when you build again.

like image 32
amrit_neo Avatar answered Oct 17 '22 05:10

amrit_neo