Managing Xcode’s Derived Data: A Practical Guide

Managing Xcode's Derived Data: A Practical Guide

28 February 2025 Stephan Petzl Leave a comment Xcode

Running low on disk space can be a common issue for developers, especially when working with resource-intensive tools like Xcode. One common question that arises is whether it’s safe to delete the contents of the DerivedData folder in Xcode. In this guide, we will explore this topic and provide a clear, actionable solution.

Understanding the DerivedData Folder

The DerivedData folder in Xcode is used to store intermediate build information and other temporary files generated during the build process. This folder can grow significantly over time, consuming valuable disk space.

Is It Safe to Delete DerivedData?

Yes, it is safe to delete the contents of the DerivedData folder. The files within this directory are not essential for your project’s source code or final build. They are generated automatically during the build process and can be recreated as needed. Deleting these files can often resolve build issues and free up disk space.

Step-by-Step Guide to Deleting DerivedData

  1. Open Xcode and navigate to Preferences.
  2. In the Locations tab, locate the DerivedData section.
  3. Click the small arrow next to the path to open the DerivedData folder in Finder.
  4. Select and delete the contents of the DerivedData folder.

Alternative Method Using Terminal

If you prefer using the terminal, you can create an alias to quickly delete the DerivedData contents:

alias purgeallbuilds='rm -rf ~/Library/Developer/Xcode/DerivedData/*'

Run the alias in the terminal to clear out the DerivedData folder.

Enhancing Your Development Workflow with Repeato

While managing disk space is crucial, ensuring efficient test automation is equally important for developers. This is where Repeato comes into play. Repeato is a no-code test automation tool for iOS, Android, and web apps. It offers a fast and intuitive way to create, run, and maintain automated tests using computer vision and AI.

With Repeato, you can easily manage and version control your test data, thanks to its support for text and JSON formats. This makes it a practical alternative to other tools like Katalon, especially for developers looking for a more adaptable and resource-efficient solution.

For more information on how Repeato can streamline your testing process, visit our documentation page.

Like this article? there’s more where that came from!