I have removed a Container I used to have after bootcamp partition, so now I have 246.1 GB free space as can be seen in the diskutil list below:
MacBook-Pro ~ % diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk0
1: EFI EFI 314.6 MB disk0s1
2: Apple_APFS Container disk1 625.3 GB disk0s2
3: Microsoft Basic Data BOOTCAMP 128.8 GB disk0s4
(free space) 246.1 GB -
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +625.3 GB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD 11.7 GB disk1s1
2: APFS Snapshot com.apple.os.update-... 11.7 GB disk1s1s1
3: APFS Volume Macintosh HD - Data 248.3 GB disk1s2
4: APFS Volume Preboot 3.7 GB disk1s3
5: APFS Volume Recovery 1.1 GB disk1s4
6: APFS Volume VM 20.5 KB disk1s5
I have tried using diskutil apfs resizecontainer disk0s2 0
, to add it to my Macintosh HD, but I have got the following, and of course I assume is because of Bootcamp partition.
diskutil apfs resizecontainer disk0s2 0
Started APFS operation
Error: -69519: The target disk is too small for this operation, or a gap is required in your partition map which is missing or too small, which is often caused by an attempt to grow a partition beyond the beginning of another partition or beyond the end of partition map usable space
The thing is, I do not want to remove my bootcamp as I have multiple configurations there.
Is there a way to add that free space to my Macintosh disk0s2
?