Format Linux partition USB SD I have a Transcend SD Card 256GB

I was installing CentOS in one partition of my SD Card, testing the OS in my MacBook Air.

Now I can't remove the partition and restore my SD.



sh-3.2# diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *121.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:          Apple_CoreStorage Macintosh HD            120.5 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

/dev/disk1 (internal, virtual):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS Macintosh HD           +120.1 GB   disk1
                                 Logical Volume on disk0s2
                                 7887C476-CBE0-4D10-B95A-5C79F83B20D7
                                 Unencrypted

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *15.4 GB    disk2

/dev/disk3 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *259.7 GB   disk3
   1:                        EFI EFI                     209.7 MB   disk3s1
   2:       Microsoft Basic Data ExFAT                   99.5 GB    disk3s2
   3:       Microsoft Basic Data W                       84.9 GB    disk3s3
   4:       Microsoft Basic Data DEL                     1.1 GB     disk3s4
   5:                  Linux LVM                         73.9 GB    disk3s5

/dev/disk4 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        *7.5 GB     disk4
   1:        Apple_partition_map                         32.3 KB    disk4s1
   2:               Windows_NTFS Untitled0               7.5 GB     disk4s2

/dev/disk5 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        *44.6 GB    disk5
   1:        Apple_partition_map                         32.3 KB    disk5s1
   2:               Windows_NTFS Untitled1               44.6 GB    disk5s2

/dev/disk6 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        *21.8 GB    disk6
   1:        Apple_partition_map                         32.3 KB    disk6s1
   2:               Windows_NTFS Untitled2               21.8 GB    disk6s2

/dev/disk7 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk7
   1:                        EFI EFI                     209.7 MB   disk7s1
   2:                  Apple_HFS HD710A                  999.9 GB   disk7s2

sh-3.2# 


I have problem with:

5:                  Linux LVM                         73.9 GB    disk3s5


I'm using macOS Sierra 10.12.6

I got:

sh-3.2# sudo diskutil eraseVolume JHFS+ ExLinux disk3s5
Started erase on disk3s5
Unmounting disk
Error: -69879: Couldn't open disk
sh-3.2#
This will erase the partition to make it visible in Disk Utility(change PartitionName to whatever you want and see below to get DiskIdentifier):

sudo diskutil eraseVolume JHFS+ PartitionName DiskIdentifier


To get DiskIdentifier, Run diskutil list and find the partition you want to remove. DiskIdentifier is in the IDENTIFIER column.

Now you should be able to remove the partition in Disk Utility like normal.