Disk Utility: Remove partition

Discussion in 'MacBook Pro' started by JTToft, Apr 21, 2016.

  1. JTToft, Apr 21, 2016
    Last edited: Apr 21, 2016

    JTToft macrumors 68040

    Joined:
    Apr 27, 2010
    Location:
    Aarhus, Denmark
    #1
    Hi,

    I have a Crucial SSD connected externally via a SATA-USB cable. It has one partition spanning the entire capacity of the drive with no data on it (I've already erased it). I will be returning the SSD to where I purchased it from and so would like to return it in as much as possible the same condition as I received it. That means unformatted with no partitions as a bare drive.

    Thus my question is: How do I remove a partition in OS X? Not format/erase, not resize, but remove entirely, so the drive has no partitions.

    I am not afraid of Terminal commands.

    OS X 10.11.4. System as signature.
    Thanks.
     
  2. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #2
    I'm not sure you can. You can reformat to different formats (MS-DOS etc) and layouts (partitions), but I don't know of any way to get it back to completely unformatted like it came out of the box. Maybe someone will jump in here and correct me.

    What you could do is erase the entire disk back to one partition and that would get rid of the EFI partition and all you see on there.

    Run diskutil list in Terminal to see the physical disk number, then run this command substituting the physical disk number for disk3 in my example here.

    Code:
    diskutil eraseDisk JHFS+ Untitled disk3
    For example, diskutil list on my system gives me this. You can see the physical external drive is disk2 so you would use disk2 in the erase command to format is back to one partition.

    Code:
    /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
                                     8ECB95D8-4D59-4288-8382-B875C46976A6
                                     Unlocked Encrypted
    /dev/disk2 (external, physical):
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *750.1 GB   disk2
       1:                        EFI EFI                     209.7 MB   disk2s1
       2:          Apple_CoreStorage Backup                  260.7 GB   disk2s2
       3:                 Apple_Boot Boot OS X               134.2 MB   disk2s3
       4:                  Apple_HFS Other                   488.9 GB   disk2s4
    /dev/disk3 (external, virtual):
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:                  Apple_HFS Backup                 +260.3 GB   disk3
                                     Logical Volume on disk2s2
                                     91B1A663-11CC-464A-834F-852D07D4A45D
                                     Unlocked Encrypted
     
  3. JTToft thread starter macrumors 68040

    Joined:
    Apr 27, 2010
    Location:
    Aarhus, Denmark
    #3
    Thanks a lot for that.

    So what your command accomplishes over a standard erase in the graphical Disk Utility is that it also gets rid of the EFI partition (while still leaving one regular HFS+ partition), correct?

    It's interesting to me that actually deleting partitions doesn't appear to be an option in DU (neither graphical nor terminal).
    Perhaps it is with fdisk, though I couldn't easily find it when reading up on it, and I'm not too familiar with how it works, so I didn't want to experiment.

    Anyhow, since posting I managed to download a preview of Paragon's Hard Disk Manager for Mac, which did allow me to delete both the EFI partition and the regular partition. It still leaves the GUID Partition Table, but it's good enough.

    I appreciate the suggestion, and I'd still welcome a native way of accomplishing this if anyone has one.
     
  4. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #4
    Yes, exactly. That would just leave one, large HFS+ formatted partition.
     

Share This Page