

Use diskutil listfilesystem to get a full list of supported file systems. I like to force a rewrite of the partition map to something that macOS is familiar with like a GPT partition and HFS+ file system. $ diskutil eraseDisk free Empty /dev/diskX As the name implies, this does a simple erase of the disk and marks the free space as "empty" with no file system or partition scheme. There are a few steps you can take, but all are destructive to the data on the device.Įrase Disk. Using an Admin account will usually get around this. Sometimes the drive may have had user privileges assigned to them.

Make sure you have the correct privileges. On USB flash drives, there may be a physical switch or it may be write protected from via a write protect bit, or the chip may be modified from the factory. If it's write protected on every SD, you may have an issue with the logic board itself. On SD cards, there is a physical "write lock" switch that may become enabled. If you're having an issue where you can't access the device there are a couple things to check first: This is an attempt to write a canonical QA for this issue, as per the Meta post: Where is the list of canonical questions stored for Ask Different? This answer is based off a number of pre-existing answers expect it to be periodically edited with the goal of becoming a comprehensive information resource. ➜ ~ diskutil resetUserPermissions /dev/disk2 `id -u`Įrror encountered attempting to reset permissions for user 501 home directory on disk2: Permissions are not enabled on the disk (-69861) My USB drive appears as read only when i do CMD+I, I tried repairing the permissions but that failed too. ➜ ~ diskutil eraseDisk free EMPTY /dev/disk2 ➜ ~ diskutil eraseDisk FAT32 MYSD MBRFormat /dev/disk2 ➜ ~ diskutil eraseVolume exFAT MyName /dev/disk2s2Įrror: -69760: Unable to write to the last block of the device I've tried a bunch of commands that I've found here and there in the terminal, but none of them worked, like: ➜ ~ diskutil eraseVolume exFAT MyName /dev/disk2 dev/disk2 (external, physical):Ģ: Microsoft Basic Data Lexar 63.9 GB disk2s2

Disk Utility (macOS Catalina 10.15.2) fails to erase my USB drive (64GB key, currently formatted in exFAT).
