SafeDisk AI

Flutter FileSystemException No Space Left On Device

When Flutter exits with FileSystemException: writeFrom failed, OS Error: No space left on device, errno = 28, the failing file write is usually a symptom. Measure temp folders, .dart_tool, pub cache, Gradle, Android emulator state, Xcode, and simulator storage before deleting anything broad.

Read-only first

Find the bucket that filled before clearing caches.

Run the command for your platform, keep the output, then clean the smallest proven bucket first. This avoids wiping emulator data, iOS simulator state, or project artifacts that were not the cause.

df -h; du -sh .dart_tool build ~/.pub-cache ~/.gradle/caches ~/Library/Developer/Xcode/DerivedData ~/Library/Developer/CoreSimulator /tmp 2>/dev/null || true
Request $29 Flutter triage Request $99 team policy Runner guide
Copy-ready issue reply

Use this before suggesting a broad temp wipe.

This gives maintainers evidence without asking users to delete source files, emulator data, or all temp contents.

Before clearing broad cache folders, capture the disk buckets around the failing Flutter command:

df -h
du -sh .dart_tool build ~/.pub-cache ~/.gradle/caches /tmp 2>/dev/null || true
du -sh ~/Library/Developer/Xcode/DerivedData ~/Library/Developer/CoreSimulator 2>/dev/null || true

If the failure is in CI, also print disk usage before and after:
- flutter pub get
- flutter test / flutter build
- Gradle assemble
- emulator or simulator startup

Then clean the proven bucket:
- .dart_tool/build for project-local generated state
- /tmp/flutter_tools.* for stale Flutter temp dirs
- Gradle cache only when Gradle owns the growth
- Xcode DerivedData/CoreSimulator only for iOS/macOS builds
Request $29 triage

Common Buckets

Safer Cleanup Order

  1. Record df -h and the biggest Flutter-adjacent folders before cleanup.
  2. Close running Flutter, Gradle, emulator, simulator, and IDE processes that may still be writing.
  3. Delete project-local generated state only when you can rebuild it.
  4. Remove stale Flutter temp folders rather than every file in /tmp.
  5. Clean platform caches through their owning tools where possible.
  6. For CI, split the build around peak disk steps and print disk telemetry after each one.
Shortest paid path

Want the first safe cleanup order?

The $29 Flutter triage reviews one failing command, disk summary, or CI log and returns the first safe cleanup/split plan for Flutter, Gradle, Android emulator, Xcode, and simulator storage.

No secrets, source files, or full private logs required. A short disk summary is enough to request scope.