2

I am on 11.1 Big Sur beta. I have a partition with no disk identifier called (free space) I would like to remove this, and then make the APFS container take up the free space.

Here is a screenshot of my GPT and Disks

enter image description here

1
  • I'm on the latest Big Sur beta, which is 11.1, for some reason
    – user396679
    Commented Nov 26, 2020 at 16:24

3 Answers 3

10

This answer was tested using Big Sur (macOS 11.0.1). For Catalina, set this question.

  1. Boot to Big Sur.

  2. Close all applications. Open the Terminal application.

  3. You can create a new APFS container. An example is given below. Assume the output from diskutil list is as follows.

    The command to enter would be as follows.

    diskutil addpartition disk0s1 apfs NewAPFS 0
    
  4. Clone (replicate) your existing Big Sur installation to the new APFS container. An example is given below. Assume the output from diskutil list is as follows.

    The command to enter would be as follows.

    sudo asr --source /dev/disk1s5s1 --target /dev/disk2 --erase
    

    An alternative to the asr command would be to use the Carbon Copy Cloner.

  5. Restart the Mac and hold down the option key until the Mac Startup Manager icons appear. Hold down the control key while selecting the Big Sur that is not shown as the current default.

    An alternative would be to select the startup disk from macOS Recovery.

  6. Remove the original. An example is given below. Assume the output from diskutil list is as follows.

    The command to enter would be as follows.

    diskutil apfs deletecontainer disk2
    
  7. Reclaim the free space. An example is given below. Assume the output from diskutil list is as follows.

    The command to enter would be as follows.

    diskutil apfs resizecontainer disk1 0
    

    The final result is given below.

3
  • This answer is worth of 2^10 of points. Saved my day literally, otherwise I'd format the whole drive. Thank you very much.
    – GeekUser
    Commented Nov 17, 2021 at 21:00
  • Didn't want to find it out, but the solution worked on 12.2.1 and was a great help! Commented Apr 11, 2022 at 12:41
  • Saved my day (last part n°7 more precisely). Thank you :D Commented Feb 5, 2023 at 15:25
0

Installed both Catalina and Monterey on a small 120 GB NVMe disk, and decided to stay with Monterey assuming that I could use the space left after deleting Catalina, but could not find a way to do it, the point was that the space needed to be available after the partition, not before.

This post sent me in the right direction, but How To Clone Your Mac Using ASR from Apple Support Community included the right options for ASR to do the cloning.

0

I can confirm @david's step work on Ventura 13.7.1 as well.

I only followed the first 3 steps.

In Step 3, choose the disk appropriate to the results of your diskutil list.

For me, since the free space was after disk0s3 I modified the command to

diskutil addpartition disk0s3 apfs NewAPFS 0

enter image description here

and result was

enter image description here

Post this I was able to claim the space by expanding the partition using diskutility. (did not have to run through clone steps from above)

You must log in to answer this question.