MacOS Unable to use “(free space)” in BigSur

apfsbig surdisk-utilitypartition

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

Best Answer

You can not add free space that resides above a APFS container. An alternative, outlined in this answer, will not work because the APFS container is to large to be cloned to the free space you wished to add. You would need to first reduce the size of the Vaats - Data⁩ volume before applying the answer.

You could try shrinking the current APFS container and to create a new temporary partition. Move files from the APFS volume ⁨Vaats - Data⁩ to a volume in this new temporary partition. The idea would be to reduce space occupied by data in the APFS container so the APFS container could be cloned to a new APFS container you would create in the (free space). After cloning, the original APFS container be removed and the new APFS container could be expanded to reclaim the space. Next, copy the files stored in the temporary partition to the cloned APFS volume ⁨Vaats - Data⁩. Finally, remove the temporary partition and expand the new APFS container to reclaim the space.