As it can be seen from the screenshot below my APPLE SSD
is of size 500GBs, but my Apple_APFS Container disk1
is of size 450GBs. There was a Container disk 2
of size 50GBs before but I successfully removed it using:
sudo diskutil eraseVolume "Free Space" %noformat% /dev/disk0s4
I tried resizing the main APFS cotnainer with the following command:
diskutil apfs resizeContainer disk0s2 0
but I am getting the following error:
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
Following some screenshots displaying the current state of the sysetm:
diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 449.3 GB disk0s2
3: Apple_KernelCoreDump 655.4 MB disk0s3
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +449.3 GB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD 362.2 GB disk1s1
2: APFS Volume Preboot 55.2 MB disk1s2
3: APFS Volume Recovery 517.2 MB disk1s3
4: APFS Volume VM 1.1 GB disk1s4