USB Drive is Unusable after an Interruption of the File Copy Process on Mac

My password-protected SanDisk Cruzer 64GB drive became mountable and unlocked but unusable after an interruption in the multiple-file copy process on it.
I attempted to erase it with Disk Utility, but failed due to “writable disk required” and “volumes are locked” errors.
First Aid also reported partition map issues.
Copying can’t be completed — “Merge” returns error code 0, and “Replace” fails due to locked or read-only files.
What should I do?

I actually ran into a very similar issue with my own USB flash drive not too long ago, and Disk Utility wouldn’t erase it either.

What ended up working for me was skipping Disk Utility completely and using Terminal to wipe the drive at a lower level.

Before wiping the drive, I have to tell you that you have to rescue your files first. Is your unusable USB drive accessible? If not, you need to use a data recovery tool to recover data from it.

I have used iBoysoft Data Recovery for Mac before. This tool is excellent. It helps me recover files from my unreadable and inaccessible external hard drive. As it claims, it also supports restoring data from unmountable corrupted USB flash drives, external hard drives, SD cards, and other storage devices.

You can download iBoysoft Data Recovery for Mac, install and open it, select your USB drive and click Search for Lost Data, then check the scanning results after scanning, choose the wanted files and click Recover to get them back.

Here are my steps to erase the USB drive with Terminal:

Go to Disk Utility and make sure the drive is mounted.
Open Terminal.
Enter the following command to show all connected drives.

diskutil list

Find the identifier for your USB drive.
Run the command below and remember to replace disk2 with the actual disk identifier of your USB.

diskutil unmountDisk force /dev/disk2

Enter the following command to erase the USB. Likewise, replace disk2 with the actual disk identifier of your USB.

sudo diskutil eraseDisk ExFAT SANDISK MBRFormat /dev/disk2

According to my experience, using Terminal to erase the USB drive is a way worth trying. However, if the drive still refuses to be erased because of encryption, try Secure Erase with Disk Utility in Recovery Mode or use diskutil secureErase in Terminal (this usually bypasses the “writable disk required” issue).

Also, make sure no Finder window is accessing the drive while doing this. If you see errors, reboot your Mac, plug the drive in, and try again without mounting the volume before erasing.

Worst case, if it’s really corrupted, use diskutil partitionDisk to re-partition it from scratch.