Installing Xcode with “not enough disk space available”

Philip Niedertscheider
Geek Culture
Published in
7 min readAug 2, 2021

--

Phrases like “Xcode Beta 1X.Y.Z is out now” or “Did you try the new features of the latest Xcode update yet?” fill an iOS/macOS developer with joy. A new IDE update can be something similar to, e.g. a new knife for a chef, or a kid receiving the toy it always wanted.

But then, the devastating moment, destroying all happiness at once:

“Xcode.xip can’t be expanded because the current volume doesn’t have enough free space.”

Error prompt from the Xcodes App (github.com/RobotsAndPencils/XcodesApp)

The initial reaction: “Huh. Wait a minute? I do have enough space, don’t I?”.
Then you check your disk usage statistics, and yes, looks like there should be enough free space.

So what is the problem and how can we solve it? Let’s narrow it down.

TL;DR (Too Long; Didn’t Read)

Here’s the solution to installing Xcode when you get this error:

Create a very large file (multiple GBs) using dd (or similar), wait a moment, then delete it (and clear your trash).
Now you have enough free space to install Xcode.

--

--

Philip Niedertscheider
Geek Culture

Changing the status quo of iOS & macOS development | Self-Taught | Co-Founder/CTO @techprimate | Follow me on Twitter @philprimes for updates 🚀