diskutil list
-bash-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_APFS Container disk2 121.1 GB disk0s2
/dev/disk1 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme +2.1 GB disk1
1: Apple_HFS OS X Base System 2.0 GB disk1s1
/dev/disk2 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +121.1 GB disk2
Physical Store disk0s2
1: APFS Volume Macintosh HD 5.2 GB disk2s1
2: APFS Volume Preboot 21.9 MB disk2s2
3: APFS Volume Recovery 515.0 MB disk2s3
4: APFS Volume VM 1.1 GB disk2s4
/dev/disk3 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +5.2 MB disk3
/dev/disk4 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk4
/dev/disk5 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk5
/dev/disk6 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk6
/dev/disk7 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk7
/dev/disk8 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk8
/dev/disk9 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk9
/dev/disk10 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +12.6 MB disk10
/dev/disk11 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +4.2 MB disk11
/dev/disk12 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +1.0 MB disk12
/dev/disk13 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk13
/dev/disk14 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk14
/dev/disk15 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk15
/dev/disk16 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +1.0 MB disk16
/dev/disk17 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +6.3 MB disk17
/dev/disk18 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +6.3 MB disk18
/dev/disk19 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk19
/dev/disk20 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk20
-bash-3.2#
sw_vers -productVersion
diskutil eraseDisk jhfs+ "Macintosh HD" gpt disk0
-bash-3.2# diskutil eraseDisk jhfs+ "Macintosh HD" gpt disk0
Started erase on disk0
Unmounting disk
Creating the partition map
Waiting for partitions to activate
Formatting disk0s2 as Mac OS Extended (Journaled) with name Macintosh HD
Initialized /dev/rdisk0s2 as a 113 GB case-insensitive HFS Plus volume with a 16384k journal
Mounting disk
Finished erase on disk0
-bash-3.2#
-bash-3.2# diskutil list
/dev/disk0 (internal):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme 240.1 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 239.8 GB disk0s2
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +239.8 GB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD 5.2 GB disk1s1
2: APFS Volume Preboot 21.8 MB disk1s2
3: APFS Volume Recovery 515.0 MB disk1s3
4: APFS Volume VM 2.1 GB disk1s4
/dev/disk2 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme +2.1 GB disk2
1: Apple_HFS OS X Base System 2.0 GB disk2s1
/dev/disk3 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +5.2 MB disk3
/dev/disk4 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk4
/dev/disk5 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk5
/dev/disk6 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk6
/dev/disk7 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk7
/dev/disk8 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk8
/dev/disk9 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk9
/dev/disk10 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +12.6 MB disk10
/dev/disk11 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +4.2 MB disk11
/dev/disk12 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +1.0 MB disk12
/dev/disk13 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk13
/dev/disk14 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk14
/dev/disk15 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk15
/dev/disk16 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +1.0 MB disk16
/dev/disk17 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +6.3 MB disk17
/dev/disk18 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +6.3 MB disk18
/dev/disk19 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk19
/dev/disk20 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk20
/dev/disk21 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme +9.8 GB disk21
1: EFI EFI 209.7 MB disk21s1
2: Apple_HFS InstallESD 9.4 GB disk21s2
-bash-3.2# diskutil eraseDisk apfs "Macintosh HD" gpt disk0
Started erase on disk0
Unmounting disk
Error: -69877: Couldn't open device
-bash-3.2# diskutil ap eraseVolume "Macintosh HD" disk1s1
Usage: diskutil apfs eraseVolume <apfsVolumeDisk> -name <newName>
[-passprompt | -passphrase <passphrase> | -stdinpassphrase]
[-passphraseHint <passHint>]
where <apfsVolumeDisk> = APFS Volume DiskIdentifier
<newName> = Required replacement volume name
<passphrase> = Passphrase if encryption desired
<passHint> = some string that can be shown even while locked
Erase the contents of the given APFS Volume, losing all of its data. Unlike
deleteVolume, the APFS Volume is not removed from its APFS Container. The "new"
APFS Volume will inherit case-sensitivity or not status, but not any other
attributes. If you supply a passphrase, it will (re)appear as encrypted, with
an initial user of the "Disk" user; otherwise, it will not be encrypted.
Ownership of the affected disks is required.
Example: diskutil apfs eraseVolume disk5s1 -name Bar
-bash-3.2# diskutil eraseVolume apfs "Macintosh HD" disk1s
Unable to find disk for disk1s
-bash-3.2# diskutil eraseVolume apfs "Macintosh HD" disk1s1
Started erase
Preparing to erase APFS Volume content
Checking mount state
The volume "Macintosh HD" on disk1s1 couldn't be unmounted because it is in use by process 0 (kernel)
[ | 0%..10%.............................................. ]
diskutil: diskmanagementd (Disk Management daemon) failure
-bash-3.2# diskutil info dosk1
Could not find disk: dosk1
-bash-3.2# diskutil info disk1
Device Identifier: disk1
Device Node: /dev/disk1
Whole: Yes
Part of Whole: disk1
Device / Media Name: OWC Aura Pro X SSD
Volume Name: Not applicable (no file system)
Mounted: Not applicable (no file system)
File System: None
Content (IOContent): EF57347C-0000-11AA-AA11-00306543ECAC
OS Can Be Installed: No
Media Type: Generic
Protocol: PCI-Express
SMART Status: Not Supported
Disk / Partition UUID: 9C2A4C29-15C1-4646-A522-BE7F66E52BCA
Disk Size: 239.8 GB (239847653376 Bytes) (exactly 468452448 512-Byte-Units)
Device Block Size: 4096 Bytes
Read-Only Media: No
Read-Only Volume: Not applicable (no file system)
Device Location: Internal
Removable Media: Fixed
Solid State: Yes
Virtual: Yes
Hardware AES Support: No
-bash-3.2# diskutil ap eraseVolume "macintosh HD" disk1s1
Usage: diskutil apfs eraseVolume <apfsVolumeDisk> -name <newName>
[-passprompt | -passphrase <passphrase> | -stdinpassphrase]
[-passphraseHint <passHint>]
where <apfsVolumeDisk> = APFS Volume DiskIdentifier
<newName> = Required replacement volume name
<passphrase> = Passphrase if encryption desired
<passHint> = some string that can be shown even while locked
Erase the contents of the given APFS Volume, losing all of its data. Unlike
deleteVolume, the APFS Volume is not removed from its APFS Container. The "new"
APFS Volume will inherit case-sensitivity or not status, but not any other
attributes. If you supply a passphrase, it will (re)appear as encrypted, with
an initial user of the "Disk" user; otherwise, it will not be encrypted.
Ownership of the affected disks is required.
Example: diskutil apfs eraseVolume disk5s1 -name Bar
-bash-3.2#
diskutil ap resizeContainer disk1 235g jhfs+ BOOT 0b ; diskutil list