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.
-
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. -
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
-
Restart the Mac. This should assign the identifiers in ascending order.
-
Install Big Sur to
MyBigSur
. -
If necessary, make sure you
MyBigSur
is the default to boot and that you are currently booted toMyBigSur
. -
Use the Migration Assistant application to copy data from the old APFS container (
MacOS Big Sur
) to the new APFS container (MyBigSur
). -
Remove the old APFS container (
MacOS Big Sur
). The command is given below, but you should verify thedisk0s3
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
-
Expand the new APFS container (
MyBigSur
) to include the free space. The command is given below, but you should verify thedisk0s2
identifier is correct.diskutil apfs resizecontainer disk0s2 0