Delete Bootcamp Partition and recover Disk Full Space I have a problem with my Bootcamp partition. I decided to delete it because I don't use Windows anymore. I went through Bootcamp Assistant, tried to uninstall Windows but didn't work that way.

So I formated with Disk Utility my 40 GB Bootcamp Partition and it's now empty.

Now, I struggle in reuniting the 2 partitions and have my full 128 GB space back.
--> I tried to follow this tutorial but in vain :

I deleted my Bootcamp partition but can&#39;t resize my OS X partition

I unmounted both volumes and I'm stuck at the 2nd step of the tutorial :

gpt add -b &lt;disk0s4 start position&gt; -t windows /dev/disk0


It says " No space available".
Does anyone know what's going on here?



The output of sudo gpt -r show disk0:

    start       size  index  contents
        0          1         PMBR
        1          1         Pri GPT header
        2         32         Pri GPT table
       34          6         
       40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
   409640  147408336      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
147817976    1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
149087512        744         
149088256   87627736      4  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
236715992     262151         
236978143         32         Sec GPT table
236978175          1         Sec GPT header
The linked method to create a fake Boot Camp partition doesn't work because the former partition is no empty space but an HFS volume (disk0s4). The gpt command won't add partitions in allocated disk space.

To resize your main partition (disk0s2) to the full ~120 GB, boot to your main macOS volume, delete the second HFS+ volume and expand your main partition:

diskutil eraseVolume Free Space disk0s4


Try to expand the main volume:

diskutil resizeVolume disk0s2 R


If the R size option fails try to use a real size like 120g or the percentage 100% (on some external disks this may fail because of some 2 TiB limit).

diskutil resizeVolume disk0s2 120473m


or more exactly:

diskutil resizeVolume disk0s2 120473067520b


or

diskutil resizeVolume disk0s2 100%