I have used disk Utility to delete a volume and then used command line, diskutil to remove the container using,
diskutil removeContainer
Now when i type diskutil list all i see is (free space) which i cannot use anymore. I've tried doing,
diskutil apfs resizeContainer disk0s2 0
But it says, Error: -69743: The new size must be different than the existing size
Please help me on how to use that free space, i want to extend my disk0s2 to full size, thanks in advance.
The output of diskutil list is,
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
(free space) 201.5 GB -
2: Apple_APFS Container disk1 298.6 GB disk0s2
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +298.6 GB disk1
Physical Store disk0s2
1: APFS Volume Vaats - Data 221.0 GB disk1s1
2: APFS Volume Preboot 284.7 MB disk1s2
3: APFS Volume Recovery 652.6 MB disk1s3
4: APFS Volume VM 1.1 MB disk1s4
5: APFS Volume Vaats 14.9 GB disk1s5
6: APFS Snapshot com.apple.os.update-... 14.9 GB disk1s5s1
diskutil apfs resizeContainer disk0s2 500g
diskutil apfs resizeContainer disk0s2 100g
it gave error, Error: -69605: There is not enough free space in this APFS Container for this operationdiskutil apfs resizeContainer disk0s2 500g
gives 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