How can I delete derived data in Xcode 8?

XcodeXcode8

Xcode Problem Overview


The projects page seems to be disappeared from Xcode 8. I used this page for deleting the derived data.

Any idea how can I delete derived data from within Xcode 8?

Xcode Solutions


Solution 1 - Xcode

(Working in Xcode 11 and 12)

You can go to File > Workspace Settings if you are in a workspace environment or File > Project Settings for a regular project environment.

Then click over the little grey arrow under Derived data section and select your project folder to delete it.

Solution 2 - Xcode

The simplest and fastest way is the following (if you have not changed the defaults folder for DerivedData).

Open terminal and past the following:

rm -rf ~/Library/Developer/Xcode/DerivedData

Solution 3 - Xcode

Many different solutions for this problem. Most of them work as well. Another shortcut seems to be added as well:

Shift + alt + command ⌘ + K

Will ask you to:

> Are you sure you want to clean the build folder for “MyProject”? > > This will delete all of the products and intermediate files in the build folder.

In most cases this would be enough to solve your problems.

UPDATE

As of Xcode 9 you'll be able to access the Derived Data folder by navigating to

File -> Project Settings

or if you use a Workspace:

File -> Workspace Settings

And press the arrow behind the path: enter image description here

Solution 4 - Xcode

In Xcode 8, all the derived data is automatically cleaned. If you want to do it by hand, go to Locations tab from the Preferences, locate project's derived data folder, and delete files related to the project.

> In macOS 10.12 and later, Xcode cleans up stale derived data, > precompiled headers, and module caches. (23282174) > > Xcode 8.0 Release Notes

Credits to @charmingToad

But from what I observed, the same behaviour is typical when using Xcode 8 on OS X 10.11.5/6

Solution 5 - Xcode

Go to Xcode -> Project Settings

enter image description here

You can find the way to go to derived Data

enter image description here

Solution 6 - Xcode

Method 1:

  • Close Xcode

  • Open Terminal and enter this command

     rm -rf ~/Library/Developer/Xcode/DerivedData
    

Method 2:

  • Click on Xcode menu
  • Go to Preference
  • Select Locations (as shown in image)
  • Click on the arrow below the Derived Data (as shown in image).

It will bring you to the location of derived data and you can just delete it manually.

enter image description here

Solution 7 - Xcode

Manual removal of derived data

If you want to remove derived data manually just run:

rm -rf ~/Library/Developer/Xcode/DerivedData

If you want to free up more disk space there's a few other directories you might want to clear out as well though.

Automatic removal of Xcode generated files

I have created a Bash script for removing all kinds of files generated by Xcode. Removing DerivedData content can be done by running:

./xcode-clean.sh -d

More info at https://github.com/niklasberglund/xcode-clean.sh

Solution 8 - Xcode

In your terminal :

rm -rf ~/Library/Developer/Xcode/DerivedData

Solution 9 - Xcode

In the Latest Xcode version 12+ Follow the below steps, I found here https://handyopinion.com/solution-failed-to-load-info-plist-from-bundle-at-path-in-xcode/

1.

enter image description here

2.

enter image description here

It will navigate to the Derived Data folder then you can remove the content of the folder.

Solution 10 - Xcode

Select Xcode and Follow 4 steps that highlighted in photo and remove derived data then restart your project.enter image description here

Solution 11 - Xcode

Another way to go to your derived data folder is by right click on your App under "Products" folder in xcode and click "Show in Finder".

Solution 12 - Xcode

Go to the root of the project using terminal and then paste the below mentioned line

rm -rf ~/Library/Developer/Xcode/DerivedData

Once it is executed, you can verify by going to Xcode > Preference > Locations -> Tap arrow shows ["DeriveData"] end point.

Solution 13 - Xcode

Steps For Delete DerivedData:

  1. Open Finder
  2. From menu click on Go > Go to Folder
  3. Enter ~/Library/Developer/Xcode/DerivedData in textfield
  4. Click on Go button
  5. You will see the folders of your Xcode projects
  6. Delete the folders of projects, which you don't need.

Solution 14 - Xcode

I've created a bash command. Configure it with 3 simple steps. then in the terminal just type cleandd https://github.com/Salarsoleimani/Usefulscripts

Solution 15 - Xcode

It may differ between versions of xcodes. Best approach is to go xcode preference page and from tab "Locations", directly open "Derived Data" directory.

Solution 16 - Xcode

DevCleaner on the Mac App Store did the trick for me!

https://apps.apple.com/gb/app/devcleaner-for-xcode/id1388020431?mt=12

Also looks useful for removing other cruft due to Xcode. Remember this is a 3rd party app so usual trust warnings apply.

Solution 17 - Xcode

For Xcode Version 8.2 (8C38), you can remove the projects completely (project name in Xcode, programs, data, etc.) one by one by doing the following: [Note: the instructions are not for just remove the project names from the Welcome Window]

Launch the Xocde and wait until the Welcome window is displayed. The projects will be shown on the right hand side (see below) Xcode Welcome Window

Right click the project you want to remove completely and a pop window [Show in Folder] jumps out; selec it to find out where is the project in the [Finder] (see below) Find the project folder

Right click the project folder in the Finder to find it’s path through [Get Info]; use path in the Info window to go to the parent folder, and go to there[Locate the project folder path] (see below)

Right click the Project Folder (e.g. DemoProject01) and Porject file (DemoProject01.xcodeproj) and select [Move to Trash] ; you will see that (a) the folder in finder is removed AND (b) the Project in the Xcode Welcome Window’s Project List is removed.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAntoineView Question on Stackoverflow
Solution 1 - XcodeBiscaView Answer on Stackoverflow
Solution 2 - XcodezirinispView Answer on Stackoverflow
Solution 3 - XcodeAntoineView Answer on Stackoverflow
Solution 4 - XcodensinvocationView Answer on Stackoverflow
Solution 5 - XcodeNazikView Answer on Stackoverflow
Solution 6 - XcodeGhulam RasoolView Answer on Stackoverflow
Solution 7 - XcodeNiklas BerglundView Answer on Stackoverflow
Solution 8 - XcodeXysView Answer on Stackoverflow
Solution 9 - XcodeAsad Ali ChoudhryView Answer on Stackoverflow
Solution 10 - XcodeHemant SolankiView Answer on Stackoverflow
Solution 11 - XcodeAnsyar HafidView Answer on Stackoverflow
Solution 12 - XcodeDaniis1infiniteloopView Answer on Stackoverflow
Solution 13 - XcodeSiddhesh BhideView Answer on Stackoverflow
Solution 14 - XcodeSalar SoleimaniView Answer on Stackoverflow
Solution 15 - XcodeAlirezaView Answer on Stackoverflow
Solution 16 - Xcodevin047View Answer on Stackoverflow
Solution 17 - XcodeJubiAudioView Answer on Stackoverflow