After windows failed to install, I was left with my partition, which bootcamp was supposed to remove but it froze and I exited it (probably not the brightest idea ever). So now I have these extra partitions and I'm trying to merge them back into my main disk, like how it was before the windows installation.

I've tried looking online at what to do but the (-) option that most sites seem to suggest using is greyed out, and would highly appreciate anyone who could help me.

I've attached screenshots of my disk information. I have the 2017 iMac, with Mojave installed.

image 1

image 2

image 3

marked as duplicate by Allan, Mark, bmike Dec 14 '18 at 22:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • and you tried the resize in disk utility – Ruskes Dec 14 '18 at 18:13
  • Could you post the name of the Windows ISO file. I ask because there would seem to be a problem with the 1809 release of Windows. If you are using this release, then this would explain why your installation failed. – David Anderson Dec 14 '18 at 20:21
  • Thank you so much for your help!! I followed your instructions and merged everything back successfully. And yes, I was using the 1809 release. – Ren Dec 15 '18 at 21:46
  • @Ren: I did get Windows installed on your Mac? If so, could you briefly explain the procedure you used? – David Anderson Dec 18 '18 at 12:08

This is a very common question. Again, here is the commands you need to enter in a Terminal application window.

I assume the untitled disk0s4 partition was created by the Boot Camp Assistant. If so, then use the command below to remove this partition. Otherwise, skip this command.

sudo diskutil eraseVolume free none disk0s4

The next two commands will remove the disk03 partition labeled OSXRESERVED and return the free space back to the disk0s2 APFS container partition.

sudo diskutil eraseVolume free none disk0s3
sudo diskutil apfs resizeContainer disk0s2 0

There may still be Windows boot files stored in the hidden EFI partition (disk0s1). These files can be removed by entering the commands given below.

sudo diskutil mount disk0s1
cd /Volumes/EFI/EFI
rm -r Boot
rm -r Microsoft
cd ~
diskutil unmount disk0s1

Not the answer you're looking for? Browse other questions tagged .