XcodesOrg / XcodesOrg/xcodes

Reclaim the APFS container space before download and unarchive steps

Open
#155 0 comments 1 reaction 0 assignees View on GitHub

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.

alt text

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.