diskutil eraseDisk apfs "Macintosh HD" gpt disk0
diskutil ap deleteContainer disk2 "Macintosh HD"
diskutil ap deleteContainer disk2 "Macintosh HD"
diskutil list internal
-bash-3.2# diskutil list internal
/dev/disk1 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *121.3 GB disk1
1: EFI EFI 314.6 MB disk1s1
2: Apple_APFS Container disk2 121.0 GB disk1s2
/dev/disk2 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +121.0 GB disk2
Physical Store disk1s2
1: APFS Volume Macintosh HD 22.4 GB disk2s5
diskutil verifyVolume disk2
-bash-3.2# diskutil verifyVolume disk2
Started file system verification on disk2
Verifying storage system
Performing fsck_apfs -n -x /dev/disk1s2
Checking the container superblock
Checking the EFI jumpstart record
warning: object (oid (0x70b52)) being reaped : Unable to mark object range (0x70b52 + 1) allocated for space verification
Checking the space manager
Checking the space manager free queue trees
Checking the object map
Checking volume
Checking the APFS volume superblock
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking snapshot 1 of 2 (com.apple.os.update-F8CC686BD994CAC58E0A525C64B2C9D6329887202C9FA5AC86D15A7994507C67)
error: (oid 0x758c0) apfs_extentref: btn: dev_read_finish(481472, 1): Input/output error
Snapshot is invalid
The volume /dev/disk1s2 could not be verified completely
Storage system check exit code is 0
Finished file system verification on disk2
diskutil ap deleteContainer disk2 "Macintosh HD"
-bash-3.2# diskutil ap deleteContainer disk2 "Macintosh HD"
Started APFS operation on disk2
Deleting APFS Container with all of its APFS Volumes
Unmounting Volumes
Unmounting Volume "Macintosh HD" on disk2s5
Unmounting Volume "Update" on disk2s6
Deleting Volumes
[ | 0%..10%..20%..30%..40%..50%.......................... ]
[ - 0%..10%..20%..30%..40%..50%.......................... ]
[ / 0%..10%..20%..30%..40%..50%.......................... ]
Deleting Container
Wiping former APFS disks
Switching content types
1 new disk created or changed due to APFS operation
Disk from APFS operation: disk1s2
Finished APFS operation on disk2
Formatting disk1s2 as Mac OS Extended (Journaled) with name Macintosh HD
diskutil ap convert disk1s2
-bash-3.2# diskutil ap convert disk1s2
Converting the volume on disk1s2 to an APFS Volume on an APFS Container
Started APFS operation on disk1s2 (Macintosh HD)
Converting HFS Volume to an APFS Container which will export one APFS Volume
The target is the Journaled HFS+ volume "Macintosh HD" backed by the GPT partition disk1s2
The target is a macOS system disk
Found APFS EFI driver /usr/standalone/i386/apfs.efi to install into the APFS Container
The target is not encrypted
Unmounting disk1s2
Starting conversion from HFS to APFS
Performing apfs_hfs_convert -x --verbose=0x400 --efi /usr/standalone/i386/apfs.efi /dev/disk1s2
Reporting pre-conversion statistics
Reporting post-conversion statistics
Successfully finished conversion from HFS to APFS
Successful conversion in commit mode so will switch type to APFS
Setting type of disk1s2 to APFS
Changing the physical disk partition type in shared mode
Partition modification attempt count was 1
Opening and closing disk1s2 to terminate old content driver
Expecting the new APFS Container at Physical Store disk1s2
Confirmed existence of new unencrypted APFS Volume disk2s1
Mounting APFS Volume disk2s1
APFS Volume mount attempt result was 0
Exiting conversion operations with error code 0
Disk from APFS operation: disk2s1
Finished APFS operation on disk1s2 (Macintosh HD)