Short Story: Why was my MacBook Air showing “No space left on device.” and blocking very simple file writes when I clearly had 131 GB available? And why did it clear up after reboot which then showed 157 GB available?

FWIW, I was importing (from the command line) a fairly large (26GB) MySQL database at the time this happened. Could that have contributed to this happening? I have imported snapshots of this DB fairly regularly in the past without issue. Why did snag me now?

Longer Story: I just had a really strange thing happen. I am using macOS Sonoma 14.2.1 on a 2022 MacBook Air with a 512GB SSD and 16GB of RAM.

While doing some basic, lightweight work with Sublime Text 3 and Git (2.43.0; installed through Homebrew) I git a Notification Center alert saying:

“No space left on device.”

Ha! Silly macOS! I check my free space on my main drive and see it had 131 GB available. What do you mean “no space left on device?”

Then I go an do a git commit -a -m "Some message." and it gives me a similar message about not being able to write to the device because the device is full?

I check the main system drive again and confirm: 131 GB available.

Starting to get concerned I hook up my external Time Machine disk to take a backup; sometimes I guess the local Time Machine backups might be taking up space and that can be cleared up by hooking the external Time Machine disk.

What happens? Time Machine fails to back anything up.

So I do what any reasonable person would do and rebooted the machine.

When it came up things worked as expected but now my main system drives shows: 157 GB available.

Huh? What happened? Why did I get “No space left on device.” messages with 131 GB available and why did my available space jump to 157 GB available after reboot?

I understand that “free space” on the main macOS system drive is an illusion due to all kinds of LVM partitions and such, but what would have caused “No space left on device.” when there was nothing really filling the device?

  • 2
    Where did you examine local free space? Did you look at your snapshot list in Disk Utility? Select the data drive and use the View menu to show the APFS snapshots. Private Size column shows how much data is unique to each snapshot too which is helpful.
    – Ezekiel
    Commented Dec 21, 2023 at 16:35
  • Do the snapshots account for the disk space? While useful, I don't think it's an answer unless the snapshots are the issue. That being said, a 120GB size snapshot means at least 120GB is being consumed by snapshots so seems likely to be at least part of the problem
    – Ezekiel
    Commented Dec 21, 2023 at 22:41
  • 1
    This behavior usually means there's a large file that has been deleted but is still open by a process (this happens when deleting a large log file that's still being written by the application). The disk space isn't recovered until the process exits, which happens when you reboot.
    – Barmar
    Commented Dec 21, 2023 at 23:46


You must log in to answer this question.

Browse other questions tagged .