How do i regain all my storage? I was running linux mint on MacBook Pro and have now gone back to Mac OS big sur and only have half the storage?

Solution 1:

You can only expand APFS containers downward. Since the free space exists above the APFS container there is not application or command provided by macOS for adding this free space to the current APFS container.

One fairly straight forward method of regaining the free space would be to do the following.

  1. Download the current version of Big Sur from the Apps Store. Since the size of the Install macOS Big Sur application is 12.58 GB, you probably will need to free up some space. Or, use another Mac to create a bootable macOS Big Sur installer.

  2. Use the command below to create a new APFS container in the free space. You may wish to substitute a different name instead of MyBigSur.

    diskutil addpartition disk0s1 APFS MyBigSur 0
    
  3. Restart the Mac. This should assign the identifiers in ascending order.

  4. Install Big Sur to MyBigSur.

  5. If necessary, make sure you MyBigSur is the default to boot and that you are currently booted to MyBigSur.

  6. Use the Migration Assistant application to copy data from the old APFS container (⁨MacOS Big Sur⁩) to the new APFS container (MyBigSur).

  7. Remove the old APFS container (⁨MacOS Big Sur⁩). The command is given below, but you should verify the disk0s3 identifier is correct.

    diskutil apfs deletecontainer disk0s3
    

    Note: Older versions of macOS (including Big Sur) would require you to enter the next command to remove the HFS volume create by the previous command. The current version of Big Sur does not require entering the command below. If you use the command below, verify verify the disk0s3 identifier is correct.

    diskutil erasevolume disk0s3 free none
    
  8. Expand the new APFS container (MyBigSur) to include the free space. The command is given below, but you should verify the disk0s2 identifier is correct.

    diskutil apfs resizecontainer disk0s2 0