Error: -69888: Couldn't unmount disk
I'm on a Mac OS Catalina trying to wipe a drive via command line.
⚡️ Desktop diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk0
1: EFI EFI 314.6 MB disk0s1
2: Apple_APFS Container disk1 1.0 TB disk0s2
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +1.0 TB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD 10.8 GB disk1s1
2: APFS Volume Macintosh HD - Data 843.8 GB disk1s2
3: APFS Volume Preboot 80.6 MB disk1s3
4: APFS Volume Recovery 526.6 MB disk1s4
5: APFS Volume VM 4.2 GB disk1s5
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk2
1: EFI EFI 209.7 MB disk2s1
2: Apple_HFS Lacie 1 TB 999.9 GB disk2s2
⚡️ Desktop diskutil eraseDisk ExFAT NONAME /dev/disk2
Started erase on disk2
Unmounting disk
[ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ]
I kept getting
⚡️ Desktop diskutil eraseDisk ExFAT NONAME /dev/disk2
Started erase on disk2
Unmounting disk
Error: -69888: Couldn't unmount disk
Run
diskutil eject disk2s2
Repeat that and sudo fuser -c /dev/disk2s2
to kill or quit any processes that are blocking the eject.