How do I regain all unallocated disk space to add it to macOS after removing bootcamp partition? I accidentally erased my Windows 10 bootcamp partition using Disk Utility by reformatting it to MS DOS FAT.  I then tried to restore it with a Winclone backup which failed.  So I finally booted from and external drive with OS X El Capitan and used terminal and a    get remove

Here is where I am at -- any assistance would be greatly appreciated:



I would just like to add disk0 index 4 to index 2
Thx
OK, I managed to solve the problem and hence answer my own question.  BTW, I'm not a fan of the Disk Utility GUI version included with OS X El Capitan - too easy to commit to things without some cautionary dialogues IMO.  That being said, I was able to reformat and reclaim the missing ex-bootcamp partition by simply using Disk Utility to reduce -- yes reduce -- the size of the OS X partition slightly ~ 5GB in this case.  After waiting about 5 minutes for the changes to be completed, here is the output: