libtool Can't Write To Output File: No Space Left On Device On macOS Runner
When a GitHub Actions macOS job fails during libtool, xcodebuild, archive, or link steps with No space left on device, the failing command is usually the messenger. The real fix is to separate runner temp files, workspace artifacts, Xcode caches, simulator runtimes, and required toolchain state before adding cleanup.
Capture the runner evidence before deleting Xcode or simulator state.
Use a short read-only scan to see what filled the runner, then turn repeat failures into a safe/review/do-not-touch cleanup policy.
df -h; du -sh "$PWD" "$RUNNER_TEMP" "$HOME/Library/Developer/Xcode/DerivedData" "$HOME/Library/Developer/CoreSimulator" "$HOME/Library/Caches" 2>/dev/null
Want a reusable macOS runner cleanup policy?
The $99 Team Storage Pilot reviews one representative runner scan or failing workflow and returns a 48-hour policy for safe cache cleanup, review-first runtimes, and protected artifacts.
First Split The Failure
- Runner temp: usually safe after the job ends, but can break later steps during the same workflow.
- Workspace artifacts: review before deleting because later jobs may need archives, dSYMs, logs, screenshots, or result bundles.
- Xcode DerivedData and ModuleCache: usually rebuildable, but clean at a controlled point in the workflow.
- Simulator runtimes and DeviceSupport: review-first because pinned iOS, watchOS, tvOS, visionOS, MAUI, Flutter, or Appium workflows may require them.
- Package caches: SwiftPM, CocoaPods, npm, pnpm, Gradle, and Homebrew should be cleaned through the owning tool where possible.
Minimal Evidence Step
- name: Capture macOS runner storage evidence
if: runner.os == 'macOS'
shell: bash
run: |
df -h
xcodebuild -version
xcrun simctl list runtimes | sed -n '1,100p'
du -sh "$PWD" "$RUNNER_TEMP" "$HOME/Library/Developer/Xcode/DerivedData" "$HOME/Library/Developer/CoreSimulator" "$HOME/Library/Caches" 2>/dev/null || true
Safe Cleanup Order
- Capture disk usage before cleanup so the next failure can be compared.
- Delete current-job temp files only after they are no longer needed.
- Clean DerivedData and package caches at a predictable boundary.
- Delete unavailable simulators before touching required runtimes.
- Keep archives, dSYMs, result bundles, and required platform runtimes behind review.
- Print disk usage after cleanup and keep enough headroom for the largest archive/link step.
Run the read-only CI scan
The scan captures runner storage, Xcode, simulator, workspace, temp, and cache evidence, then lets you preview the first policy locally in the browser.