Apple - OS X can't unmount disk

For me, none of the solutions were working: sudo unmount, sudo unmountDisk, unmountDisk force, etc., with /dev/disk4, /dev/disk4s1, /dev/disk4s2, and so on. All failed. The last thing I tried - eraseDisk - gave me the same error: Error: -69888: Couldn't unmount disk

Then I decided to see if there were any processes in my way, so I ran sudo lsof|grep disk4 and found a process working on one of my partitions. I killed the process id and suddenly the disk mounted again! Success!


The same thing happened to me because I was in the same directory as the USB drive.

I went back into my home directory (cd ~) and ran the command again and it worked.


I confirm that using Terminal instead of iTerm2 surprisingly made the command diskutil unmount and diskutil mount work!