Using the latest Macbook Pro with currently High Sierra 10.13.1, I was using bootcamp for a year, and I decided to get rid of the Bootcamp partition this morning. The Bootcamp utility would not let me erase this partition, so I decided to do it through Disk Utility.

I did everything I could to "erase" it, but I can't find any way to merge this 58GB partition with my primary Macintosh HD one.


In Disk Utility, if I want to erase the container Disk2, it tells me that an internal error occured... The BOOTCAMP partition is actually formatted as APFS...

disk utility

$ diskutil list

enter image description here

How can I merge those two partitions ?

EDIT : The BOOTCAMP partition is now gone but I can't extend the primary one ...

enter image description here

  • Hi @FrenchFalcon. Have you fixed your issue? I have the same problem but I do not want to reinstall macOS.. Mar 13, 2018 at 21:44

4 Answers 4


These are two answers I got directly from Apple after emailing Tim Cook yesterday

We are clearly lacking some documentation (and probably a feature in Disk Utility). However, you can achieve the removal using Boot Camp assistant.

Launch Boot Camp Assistant Click the Continue button You should now see a “Restore Disk to a Single Partition” screen. Click Restore, enter password

Your system will now remove the windows partition.

Sorry our experience didn’t meet your expectations. I’ll work with my engineering teams and AppleCare to get this addressed.

You tube link

https://www.youtube.com/watch?v=jy7McSE_NfI https://www.macworld.com/article/1156195/mac-apps/delete-boot-camp.html


Getting rid of Boot Camp is super simple, you use boot camp assistant to remove what it may have created. There’s a handy YouTube video which explains this process here:


I’m interested in why the install failed, so before you do this if you can help us by collecting some information, great. If you don’t have time for, that’s cool too.

Using the Boot Camp Assistant to to remove the BootCamp partition:

  1. Start the Boot Camp Assistant from the Utilities folder.
  2. At the Boot Camp Assistant Welcome Screen click Next.
  3. If the Boot Camp Assistant cannot remove the partition it will error here. If it can then you will get another dialog asking you to restore the drive (i.e. remove the Boot Camp partition).

How to create Sysdiagnose logs:

  1. Launch Terminal from the Utilities folder in Applications.
  2. Type: “sudo sysdiagnose” and hit the “return” button
  3. Type in your password (for sudo)
  4. It will prompt you to press ‘Enter’ to continue. Press the return button to continue.

Once the logs have been gathered they will be compressed into a .gz file and created in the /tmp location. A finder window will pop up also once the file is created with the correct location. We need that file as well.

Sometimes the Boot Camp Assistant fails on the first install, we are looking into this issue, if you see a failure we’ve seen reports that attempting a second install will be successful.

I have removed the Apple employee names, in line with GDPR. I hope this helps people


  • 3
    Welcome to Ask Different! :) Could you just clarify for me whether you are quoting directly from the email response you received and, if so, where the quoting starts and ends? It may be better to reformat your answer slightly to make this somewhat clearer. Of course, you can do this yourself by editing your answer and using the available block quoting format option.
    – Monomeeth
    Jun 7, 2018 at 0:16
  • You emailed Tom cook?
    – Manngo
    Apr 16, 2020 at 6:41

If anyone still looking for answer.

Step 1: Delete the container

sudo diskutil apfs deleteContainer disk0s3

this will change the container to Apple_HFS Untitled 98.9 GB disk0s3

Step 2: Erase the volume

sudo diskutil eraseVolume "Free Space" %noformat% /dev/disk0s3

Step 3: Resize the container

sudo diskutil apfs resizeContainer disk0s2 0
  • I did this, and then running Bootcamp Assistant again added the space back to the main container & partition. Nov 27, 2018 at 3:32
  • Be careful guys, I did the eraseVolume "Free Space" and now that space seems irrevocably lost. Did apfs resizeContainer but got Error: -69771: The target disk is too small. gg Dec 20, 2018 at 22:24
  • 1
    Note: the disk that you are expanding also has to be aligned with the empty space (i.e., there cannot be any partition in between – else, the container cannot be resized. Mar 21, 2019 at 14:01
  • In addition to what @gustafbstrom said above, you also need to be sure that the container you're deleting is after the container you want to resize. This should be the case if you use BootCamp, but if you're on this page because of manual partitioning you did, it is good to know. When your free space goes "missing", you'll have to use gpt create to create a new HFS volume. Aug 17, 2019 at 14:55
  • Note that the first partition may not be disk0s3 but e.g. disk2, but the label will change after the first step, e.g. into disk0s3 as written
    – Claire
    Feb 5, 2021 at 20:46
  1. Remove ‘Apple_KernelCoreDump’ and ‘Container disk2’.

    sudo diskutil eraseVolume "Free Space" %noformat% /dev/disk0s3
    sudo diskutil eraseVolume "Free Space" %noformat% /dev/disk0s4
  2. Expand ‘Container disk1’ to fill the free space.

    sudo diskutil apfs resizeContainer disk0s2 0
  • 1
    This is exactly what I wanted to do, but the resizeContainer command gives me : Started APFS operation Error: -69771: The target disk is too small for this operation
    – Scaraux
    Oct 11, 2017 at 23:44
  • @MalteseFalcon Hmm, now the other partitions are gone does it let you do the resize step in Disk Utility?
    – grg
    Oct 12, 2017 at 7:18
  • 1
    No ! It sees that my hard drive has 500 GB capacity, but shows me that me current partition has 440 GB and thats already the maximum it can be extended to... (see picture above)
    – Scaraux
    Oct 12, 2017 at 8:18
  • @MalteseFalcon Can you click on the star in the pie chart? Does a partition show on the information on the right?
    – grg
    Oct 12, 2017 at 8:35
  • The "star" represents the Kernel Core Dump Storage... (and its 655 MB only)
    – Scaraux
    Oct 12, 2017 at 8:44

Unfortunately, after trying all solutions I found, I had to restart my comuputer in recovery mode, and reinstall a fresh OSX. I made a Time Machine backup before doing this, and I am now running my Mac as before, but with the fully reclaimed space (500.00 GB)

You must log in to answer this question.

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