How to delete derived data in Xcode
Your in-app backend just got FREE ⚒️
Glassfy is the ultimate, free SDK for in-app monetization in Swift. Stay ahead with automatic store upgrades and manage subscriptions with ease. No more backend hassle, just revenue growth.Learn More!
Xcode stores intermediate build results, generated indexes and other built results in form of derived data.
It can grows to 5-10 GBs or even more depending on how complex your projects are. Sometimes, derived data can result into strange Xcode errors. That's why it is highly recommendable to delete the derived data. Also, note here that it is totally alright to delete the derived data (there are few consequences described in next paragraph). You won’t lose any your app data if you delete the derived data. Moreover, who doesn't enjoys some more storage.
Deleting derived data can have some consequences, as if you are using Swift package manager, all the cache in your derived data will be gone, that could be not desirable.
So today, we are going to learn about two ways we can delete the Xcode derived data.
Using Mac Finder
a) In Mac Finder, click "Go" in tab bar and hold your option key to see the “Library" Option.
b) Go to the Xcode -> Location, Go to derived data and click the arrow which will take you to the derived data folder.
Go to Developer -> Xcode -> Derived Data and feel free to delete the contents of the derived data folder.
2. Using Terminal
Paste and run the following command in the terminal and you are good to go.
rm -rf ~/Library/Developer/Xcode/DerivedData
Now that you have learned how to delete derived data from Xcode project, you might also like to know about how to add custom theme to your Xcode. For more updates, stay tuned by subscribing to our newsletter. Till then,
Eat. Sleep. Swift Anytime. Repeat.
Want latest weekly iOS updates?
Sign up for our newsletter.