1 pointby ofc-tahaabbasi4 hours ago1 comment
  • ofc-tahaabbasi4 hours ago
    This came from a real debugging session. My SanDisk Extreme SSD wouldn't eject — macOS just said "The disk couldn't be ejected because the Finder is using it." The usual advice is to log out, but I had 30+ apps open.

    I ran lsof +D /Volumes/Extreme\ SSD and found Preview had open file handles on trashed video files, plus Spotlight was indexing. Killed Preview, waited for Spotlight to release, ejected cleanly.

    DiskFree packages that workflow into one command. It runs lsof on the target volume, categorizes blockers into user apps vs. system processes (mds, fseventsd, etc.), shows read/write status so you know if something is actively writing, then gracefully closes the user apps and ejects.

    Single bash file, ~340 lines, zero dependencies beyond what ships with macOS (lsof, diskutil, kill). MIT licensed.

    Happy to hear feedback — especially edge cases I haven't hit yet.