MacOS – After deleting Bootcamp .. I failed to merge free disk space using Disk Utility

bootcampdisk-utilitydiskutilmacospartition

After deleting Bootcamp partition I cannot merge it back to Macintosh HD partition nor even using it to install windows again.

Using Disk Utility this is what happens:

1

2

3

4

5

I tried to login to MacOS recovery mode and do the same thing.. but still getting the same error..

Output from diskutil list:
Output

Output from sudo gpt -r show /dev/disk0
Output

*I'm Running MacOS 10.13.6 on Retina MacBook Pro Late 2013

Thanks

Best Answer

Thanks to David Anderson in the comment section.

I used that terminal command:

sudo diskutil apfs resizeContainer disk0s2 0

and it worked!

Thanks again!