Bootcamp Assistant couldn’t roll back, How to merge the volume back to Macintosh HD

bootcampdisk-utilitydisk-volumehard drivepartition

diskutil list

I basically tried to partition my 500GB hard drive to 350GB/150 GB ratio to install windows 10. However since the Bootcamp assistant could not download the windows support files it had to roll back. However, it’s been an hour since the process started and so I quit the BCA. I’ve uploaded a picture of the list of diskutil list and I have no idea what’s going on.

I’d highly appreciate it if one of you experts can show me how I can merge them back into Macintosh HD as a single 500GB volume.

Thanks in advance !

Best Answer

Basically, your question is a duplicate, which has be asked many times before. For example, see the question: The startup disk cannot be partitioned or restored to a single partition. Windows 10 and Mojave

I repeated my answer below. The answer was edited to more closely fit your question.

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

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

These commands will have removed the Windows partitions and expanded the macOS partition to recover the free space. However, 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