Imported from the Apple Support Forums via the Wayback Machine 🔗
I have a 2017 MacBook Pro with 250GB SSD. I created a Windows partition some time ago but stopped using Windows, so I wanted to remove it and restore the 40GB allocated to the partition back to my main partition.
According to the Boot Camp instructions, I am supposed to be able to restore the space back to my mac, but it seems that I did something wrong, since now the Windows partition has disappeared but the space is not back on my main partition.
Here is the output for the "diskutil list" and "diskutil cs list" commands:
Last login: Sun Mar 3 21:42:53 on console
bysja@mbp:~|⇒ diskutil list
/dev/disk0 (internal):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme 251.0 GB disk0
1: EFI EFI 314.6 MB disk0s1
2: Apple_APFS Container disk1 210.0 GB disk0s2
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +210.0 GB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD 140.3 GB disk1s1
2: APFS Volume Preboot 82.7 MB disk1s2
3: APFS Volume Recovery 1.6 GB disk1s3
4: APFS Volume VM 3.2 GB disk1s4
bysja@mbp:~|⇒ diskutil cs list
No CoreStorage logical volume groups found
Imported from the Apple Support Forums via the Wayback Machine 🔗
Wow, thank you! This command completely resolved the issue in less than 30 seconds. The SSD is now back at full capacity.
bysja@mbp:~|⇒ diskutil apfs resizeContainer disk1 0g
Started APFS operation
Aligning grow delta to 40.685.187.072 bytes and targeting a new physical store size of 250.685.575.168 bytes
Determined the maximum size for the targeted physical store of this APFS Container to be 250.684.547.072 bytes
Resizing APFS Container designated by APFS Container Reference disk1
The specific APFS Physical Store being resized is disk0s2
Verifying storage system
Using live mode
Performing fsck_apfs -n -x -l -S /dev/disk0s2
Checking the container superblock
Checking the EFI jumpstart record
Checking the space manager
Checking the space manager free queue trees
Checking the object map
Checking volume
Checking the APFS volume superblock
The volume Macintosh HD was formatted by newfs_apfs (748.1.46) and last modified by apfs_kext (945.241.4)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Checking volume
Checking the APFS volume superblock
The volume Preboot was formatted by newfs_apfs (748.1.46) and last modified by apfs_kext (945.241.4)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Checking volume
Checking the APFS volume superblock
The volume Recovery was formatted by newfs_apfs (748.1.46) and last modified by apfs_kext (945.241.4)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Checking volume
Checking the APFS volume superblock
The volume VM was formatted by newfs_apfs (748.1.47) and last modified by apfs_kext (945.241.4)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Verifying allocated space
Performing deferred repairs
The volume /dev/disk0s2 appears to be OK
Storage system check exit code is 0
Growing APFS Physical Store disk0s2 from 210.000.388.096 to 250.685.575.168 bytes
Modifying partition map
Growing APFS data structures
Finished APFS operation
0
Loner T·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Run
diskutil apfs resizeContainer disk1 0g
and post the output.
0
Loner T·
Imported from the Apple Support Forums via the Wayback Machine 🔗