Question

I want to delete Apple_APFS container disk1 and reclaim the space to disk2.

I boot on disk2 (Macintosh HD).

enter image description here

Was it helpful?

Solution

This is a duplicate question, however I will still post this answer.

The steps are not obvious.

  1. Use the diskutil command to convert the disk1 APFS container to an empty JHFS+ formatted partition.

    sudo diskutil apfs deletecontainer disk0s3
    
  2. Remove the JHFS+ formatted partition disk0s3. The free space will not belong to any partition.

    sudo diskutil erasevolume free none disk0s3
    
  3. Expand the disk2 container to reclaim the just created free space. The value of 0 means to reclaim as much free space as exists directly after the disk0s2 APFS container partition.

    sudo diskutil apfs resizecontainer disk0s2 0
    
Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top