Featured Article

Xcode: Switch Build Location Note: The title adheres to SEO best practices, including using the target keyword "xcode" at the beginning and making the phrase concise and descriptive to attract potential click-throughs.

William Aug 14, 2026

Have you ever found yourself wishing you could change the build location of your Xcode project to a more convenient or organized spot on your machine? Unfortunately, Xcode doesn't provide a straightforward setting for this. However, there's a workaround to achieve this, and we're here to guide you through the process.

Xcode Tutorial For Beginners
Xcode Tutorial For Beginners

Before we dive into the steps, let's first understand why you might want to change the build location. Perhaps you've set up a specific directory for your project's derivative data, or maybe you want to organize your projects better across multiple drives. Whatever the reason, this tutorial will help you achieve your goal.

24 Quick Xcode Tips
24 Quick Xcode Tips

Understanding Xcode's Build Location

By default, Xcode stores build artifacts in the DerivedData folder located in your home Library. This folder contains cached data, build results, and intermediate products. Changing the build location will move these files to a new directory.

Xcode for Windows
Xcode for Windows

It's essential to note that the DerivedData folder is deleted and recreated whenever you clean the build folder or delete the app from the device. Therefore, any changes made to the build location will be permanent unless you perform a clean build or delete the app.

Changing the Build Location for a Single Project

Xcode Tutorial for Beginners (2026) : CodeWithChris
Xcode Tutorial for Beginners (2026) : CodeWithChris

If you want to change the build location for just one project, you can do so by directly manipulating the build settings. Here's how:

  1. Select your project in the Project Navigator.
  2. Go to the target you want to modify.
  3. Click on the "Build Settings" tab.
  4. Search for "Intermediate Strings File" in the search bar that appears above the list of build settings.
  5. In the "Intermediate Strings File" line, click on the rightmost arrow in the text field that says "".
  6. Choose a new location for the build artifacts. Make sure the path you choose is accessible and writable.
  7. Click "OK" to close the dialog.
  8. Clean and build your project. Xcode will now create a DerivedData folder at the new location for your selected target.

Changing the Build Location for All Projects

Xcode 5: general info
Xcode 5: general info

If you want to change the build location for all projects, you can create a custom_ARGS file to override the default DerivedData location.

Here's how to create the custom_ARGS file:

  1. Open a text editor and create a new file. Save this file as "custom_ARGS" without any extension.
  2. Add the following line to the file, replacing "~/path/to/your/new/DerivedData" with the desired path: -DerivedDataLocation ~/path/to/your/new/DerivedData
  3. Save the file with the custom Arguments shell script. Make sure it's executable.
  4. Launch Xcode, and open the "Execute Script" tool (Place the cursor at the top of the script editor, press `Option+Return`).
  5. In the "Execute Script" tool, add the following line: set -ex && "${SRCROOT}/custom_ARGS" && echo "DerivedDataLocation is ${DERIVEDDATA Location}"
  6. Run the script. Xcode will now use the specified location for all DerivedData folders.
Can You Really Build an App Without Knowing How to Code? My Experience Using AI and Lovable
Can You Really Build an App Without Knowing How to Code? My Experience Using AI and Lovable

Managing the DerivedData Folder

Since the DerivedData folder can grow significantly, especially with large projects, it's a good idea to manage it regularly. You can delete the DerivedData folder to free up space, although this will also delete all cached data and intermediate products, which can slow down the build process.

an image of the welcome screen to xcode application on mac os 6 0 1
an image of the welcome screen to xcode application on mac os 6 0 1
15 Powerful Alternatives to Xcode For Windows Developers
15 Powerful Alternatives to Xcode For Windows Developers
Bí kíp setup Claude Code để code cực mượt và bảo mật tuyệt đối
Bí kíp setup Claude Code để code cực mượt và bảo mật tuyệt đối
an image of a small house with pumpkins on the ground and trees in the yard
an image of a small house with pumpkins on the ground and trees in the yard
How to Change Location on iPhone in 2026
How to Change Location on iPhone in 2026
Getting Started Building iPhone Apps in Xcode 4.2 — Speckyboy
Getting Started Building iPhone Apps in Xcode 4.2 — Speckyboy
10 Best Xcode Themes for Your Project
10 Best Xcode Themes for Your Project
The Guide to Fixing Xcode Errors and Crashes : CodeWithChris
The Guide to Fixing Xcode Errors and Crashes : CodeWithChris
Xcode UI Testing in Swift – Code Examples
Xcode UI Testing in Swift – Code Examples
🚀 Boost your VS Code productivity with these must-have extensions!

The right extensions can save hours of coding, improve code quality, and make development much smoother.

📌 In this post, you'll discover 20 VS Code extensions that every developer should know.

💻 Whether you're learning Web Development or building real-world projects, these tools can seriously improve your workflow.

💬 Which VS Code extension can't you live without? Let me know in the comments!

❤️ Save this post for later.
... Learning Web, Learn Web Development, Web Development, Improve Yourself, Coding, Let It Be
🚀 Boost your VS Code productivity with these must-have extensions! The right extensions can save hours of coding, improve code quality, and make development much smoother. 📌 In this post, you'll discover 20 VS Code extensions that every developer should know. 💻 Whether you're learning Web Development or building real-world projects, these tools can seriously improve your workflow. 💬 Which VS Code extension can't you live without? Let me know in the comments! ❤️ Save this post for later. ... Learning Web, Learn Web Development, Web Development, Improve Yourself, Coding, Let It Be
How to Maximize Codex Exec Command | Towards Data Science
How to Maximize Codex Exec Command | Towards Data Science
X Releases Core Algorithm Code Amid Global Regulatory Pressure - Brave New Coin
X Releases Core Algorithm Code Amid Global Regulatory Pressure - Brave New Coin
How to Build Your Brand Name through Social Media Marketing
How to Build Your Brand Name through Social Media Marketing
TOP 20 VS CODE EXTENSIONS
TOP 20 VS CODE EXTENSIONS
How to Install Xcode on Windows (4 Easy Steps)
How to Install Xcode on Windows (4 Easy Steps)
How to Change Location on iPhone: A Complete Guide That Actually Works
How to Change Location on iPhone: A Complete Guide That Actually Works
15+ Best IDE And Tools For Flutter App Development 2026
15+ Best IDE And Tools For Flutter App Development 2026
The Power of Xcode
The Power of Xcode

To delete the DerivedData folder, you can either:

  • Use Finder to navigate to the DerivedData folder and delete it.
  • Or use the following Terminal command: rm -rf ~/Library/Developer/Xcode/DerivedData/.

Monitoring DerivedData Size

To keep an eye on the DerivedData folder's size, you can use the following Terminal command, which also deletes files older than a specified number of days:

find ~/Library/Developer/Xcode/DerivedData -name "*.xcuserstate" -exec rm {} \; && find ~/Library/Developer/Xcode/DerivedData -type f -exec stat -x '{}' + | awk '($13 > 0) {print $9; a++} END {print "Number of files: ", a}'

Automating DerivedData Management

To automate the process of managing the DerivedData folder, you can create an Xcode build phase script to delete old files. This way, the DerivedData folder will be cleaned up automatically every time you build your project.

With these tips and tricks, you can now change the build location, manage the DerivedData folder, and maintain a cleaner, more organized Xcode project environment. Happy coding!