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 314.6 MB disk0s1
2: Apple_APFS Container disk2 121.0 GB disk0s2
/dev/disk1 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme +3.2 GB disk1
1: EFI EFI 209.7 MB disk1s1
2: Apple_HFS macOS Base System 2.9 GB disk1s2
/dev/disk2 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +121.0 GB disk2
Physical Store disk0s2
1: APFS Volume Preboot 45.6 MB disk2s2
2: APFS Volume Recovery 1.6 GB disk2s3
3: APFS Volume VM 1.1 GB disk2s4
4: APFS Volume Mac Os 5.2 GB disk2s6
/dev/disk3 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +10.5 MB disk3
/dev/disk4 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +10.5 MB 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 +524.3 KB 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 +10.5 MB disk9
/dev/disk10 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 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 +2.1 MB disk15
/dev/disk16 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk16
/dev/disk17 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +1.0 MB disk17
/dev/disk18 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB 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: untitled +2.1 MB disk21
-bash-3.2#
diskutil ap deleteContainer disk2 "Mac OS"
-bash-3.2# diskutil ap deleteContainer disk2 "Mac OS"
Started APFS operation on disk2
Deleting APFS Container with all of its APFS Volumes
Unmounting Volumes
Unmounting Volume "Preboot" on disk2s2
Unmounting Volume "Recovery" on disk2s3
Unmounting Volume "VM" on disk2s4
Unmounting Volume "Mac Os" on disk2s6
Deleting Volumes
Deleting Container
Wiping former APFS disks
Switching content types
1 new disk created or changed due to APFS operation
Disk from APFS operation: disk0s2
Finished APFS operation on disk2
Formatting disk0s2 as Mac OS Extended (Journaled) with name Mac OS
-bash-3.2#
-bash-3.2# diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *121.3 GB disk0
1: EFI EFI 314.6 MB disk0s1
2: Apple_HFS Mac OS 120.9 GB disk0s2
/dev/disk1 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme +3.2 GB disk1
1: EFI EFI 209.7 MB disk1s1
2: Apple_HFS macOS Base System 2.9 GB disk1s2
/dev/disk3 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +10.5 MB disk3
/dev/disk4 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +10.5 MB 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 +524.3 KB 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 +10.5 MB disk9
/dev/disk10 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 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 +2.1 MB disk15
/dev/disk16 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk16
/dev/disk17 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +1.0 MB disk17
/dev/disk18 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB 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: untitled +2.1 MB disk21
-bash-3.2#
-bash-3.2# diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.1 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk2 499.9 GB disk0s2
/dev/disk1 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *2.0 TB disk1
1: EFI EFI 209.7 MB disk1s1
2: Apple_HFS Stockage 2.0 TB disk1s2
/dev/disk2 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +499.9 GB disk2
Physical Store disk0s2
1: APFS Volume Macintosh HD 5.2 GB disk2s1
2: APFS Volume Preboot 25.3 MB disk2s2
3: APFS Volume Recovery 515.0 MB disk2s3
4: APFS Volume VM 24.6 KB disk2s4
/dev/disk3 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme +2.1 GB disk3
1: Apple_HFS OS X Base System 2.0 GB disk3s1
/dev/disk4 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +5.2 MB 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 +524.3 KB disk7
/dev/disk8 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB 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 +524.3 KB disk10
/dev/disk11 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +12.6 MB disk11
/dev/disk12 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +4.2 MB disk12
/dev/disk13 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +1.0 MB disk13
/dev/disk14 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB 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 +524.3 KB disk16
/dev/disk17 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +1.0 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 +6.3 MB disk19
/dev/disk20 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +524.3 KB disk20
/dev/disk21 (disk image):
#: TYPE NAME SIZE IDENTIFIER
0: untitled +2.1 MB disk21
-bash-3.2#
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 disk2s1
Unmounting Volume "Preboot" on disk2s2
Unmounting Volume "Recovery" on disk2s3
The volume "Recovery" on disk2s3 couldn't be unmounted because it is in use by process 0 (kernel)
Error: -69888: Couldn't unmount disk
-bash-3.2#
diskutil ap resizeContainer disk2 490g jhfs+ BOOT 0b
-bash-3.2# diskutil ap resizeContainer disk2 490g jhfs+ BOOT 0b
Started APFS operation
Aligning shrink delta to 9 898 106 880 bytes and targeting a new physical store size of 489 999 998 976 bytes
Determined the minimum size for the targeted physical store of this APFS Container to be 6 149 898 240 bytes
Resizing APFS Container designated by APFS Container Reference disk2
The specific APFS Physical Store being resized is disk0s2
Verifying storage system
Using live mode
Performing fsck_apfs -n -x -l /dev/disk0s2
Checking volume
Checking the container superblock
Checking the EFI jumpstart record
Checking the space manager
Checking the object map
Checking the APFS volume superblock
Checking the object map
Checking the fsroot tree
Checking the snapshot metadata tree
Checking the extent ref tree
Checking the snapshots
Checking the APFS volume superblock
Checking the object map
Checking the fsroot tree
Checking the snapshot metadata tree
Checking the extent ref tree
Checking the snapshots
Checking the APFS volume superblock
Checking the object map
Checking the fsroot tree
Checking the snapshot metadata tree
Checking the extent ref tree
Checking the snapshots
Checking the APFS volume superblock
Checking the object map
Checking the fsroot tree
Checking the snapshot metadata tree
Checking the extent ref tree
Checking the snapshots
Verifying allocated space
warning: Overallocation Detected on Main device: (5618659+1) bitmap address (2098f)
The volume /dev/disk0s2 appears to be OK
Storage system check exit code is 0
Shrinking APFS Physical Store disk0s2 from 499 898 105 856 to 489 999 998 976 bytes
Shrinking APFS data structures
Shrinking partition
Modifying partition map
Initialized /dev/rdisk0s3 as a 9 GB case-insensitive HFS Plus volume with a 8192k journal
Mounting disk
1 new disk created or changed due to APFS operation
Disk from APFS operation: disk0s3
Finished APFS operation
-bash-3.2#
asr restore --s / --t /Vol*/BOOT --erase --noprompt
-bash-3.2# asr restore --s / --t /Vol*/BOOT --erase --noprompt
Validating target...done
Validating source...done
Validating sizes...done
Restoring ....10....20....30....40....50....60....70....80....90....100
Verifying ....10....20....30....40....50....60....70....80....90....100
Remounting target volume...done
-bash-3.2#