Is it safe to delete Xcode DerivedData?
Yes. DerivedData contains build artifacts that Xcode regenerates on the next build. Broza marks it as a safe, green-risk item.
What it is
Everything a compiler or a package manager wrote so it would not have to do the work twice: Xcode DerivedData and Archives, node_modules directories, __pycache__, .gradle, Rust target/ directories, and the virtual disk Docker Desktop stores its images in.
What it is for
It makes the second build faster than the first. On a developer's Mac it is usually the single largest reclaimable category, and none of it is source code: every byte is reproducible from a repository and a build command.
Is it safe to delete?
Yes for the build outputs, which Broza moves to quarantine; the next build recreates them. The Docker virtual disk is the exception: Broza only reports its size and points at docker system prune, because shrinking that file is Docker's job, not a file manager's.
How Broza handles Xcode data
Broza rates DerivedData SAFE and Xcode Archives REVIEW: an archive is a shipped build, and nothing recreates it. Both are moved to quarantine rather than deleted, so broza restore can put them back until the session expires (30 days by default).
Check it on your Mac
Broza is a free, open-source command-line tool. Every command below is read-only except clean, and clean is a dry run until you add --apply.
broza explain build-cache broza suggest --category build-cache broza clean --category build-cacheNot installed yet? Install Broza with Homebrew, the installer script, or Cargo.