Reclaim the APFS container space before download and unarchive steps
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 4.8k
- Forks
- 182
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 1
Description
I'm constantly getting hit by this error:
Xcode.xip can’t be expanded because the current volume doesn’t have enough free space.

I DO have x2 - x5 times the size of Xcode archive or the binary, but the problem is really with the way APFS works.
Following this tip I'm creating a large (~20 GB) file before downloading or unarchiving, and then deleting it after a few seconds and proceeding with the installation.
I thought Xcodes might automate this step.
There is a complete article explaining the underlying APNS problem, but in case it's behind the paywall for you, here is the command that creates a 20GB file:
dd if=/dev/urandom of=temp_20GB_file bs=1024 count=$[1024 * 1024 * 20]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named; start by tracing the CLI's download and unarchive workflow and how it handles temporary files on APFS. The change is done when the workflow reclaims or preallocates the needed container space before downloading or unarchiving, then removes the temporary file before installation proceeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, swift
- Domain
- cli, operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100