3

I’m in a pickle here. macOS Mojave, just updated the other day. I managed to fill my disk up while creating a .dmg, and the system froze. I rebooted. Kernel panic.

Boot to Recovery mode. Mount the disk. Open Terminal.

–bash–3.2# rm /path/to/large/file rm: /path/to/large/file: No space left on device

Essentially the same issue as this Unix thread from ‘08! https://www.unix.com/linux/69889-unable-remove-file-using-rm-disk-space-full.html

I’ve tried echo x > /path/to/large/file, no good.

It’s borked. Does anyone have any suggestions that aren’t “wipe the drive and restore from your backup”?

  • Have you tried deleting some other files / folders to get it going? If not you may have already given the solution... just hope your backup is up to date... – Solar Mike Oct 6 '18 at 4:32
  • 1
    The point is that it was impossible to delete any files/folders. – John Noble Oct 7 '18 at 5:18
3

I am so lucky. Posting this to hopefully help others.

I had partitioned my APFS volume, and was able to delete the non-boot partition. This gave the boot volume enough space, and I'm back up. I'll clean up the drive and restore that volume.

I found a post on a ZFS forum that suggested that these new filesystems require some disk space to perform any disk operation. If you have 0% left, you're out of luck.

All other tricks to remove the file, to overwrite it with null data, failed.

dd if=/dev/null of=/path/to/large/file failed.

true |> /path/to/large/file (or something similar, I forget the exact command) failed.

Everything failed, except booting in to Recovery mode and, without mounting any drives first, deleting the extra APFS partition.

Lesson: keep a ~100MB dummy partition (or just quota your main drive so it can't take up 100% of the physical disk) as your get-out-of-jail card.

Edit: I actually mean that I had multiple APFS volumes on my boot partition, and that I deleted one of those volumes. Old language dies hard.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .