1

So I removed bootcamp and now there is a partition called "free space" that I can't remove.

Here is my output from diskutil list:

enter image description here

Here is the screenshot from disk utility showing the partitions:

enter image description here

And here is the error I get when I try to remove "free space":

enter image description here

Heres the output when I run

sudo diskutil apfs resizeContainer disk0s2 0

enter image description here

3

This is a very common question. Once again, the answer is given below.

sudo diskutil apfs resizeContainer disk0s2 0
3
  • None of the solutions I found online worked. When I tried to run this line, it said "storage system verify or repair failed". The output is above
    – Victor Yin
    May 4 '19 at 20:44
  • Yes, if there is something wrong with the APFS container, then the software will not expand the partition to reclaim the free space. You can try the command diskutil repairvolume disk0s2, but you probably will have to first boot to macOS Recovery. If that does not work, then you probably should backup your files and reinstall macOS. May 4 '19 at 22:46
  • Thanks, after that command I was able to remove the "free space".
    – Victor Yin
    May 18 '19 at 17:57
0

Unbelievably complex problem solved quite easily by some "magic"

How was the problem created in the first place:

  • My disk whole space 1TB
  • i created 150 GB boot camp windows 10 partition via boot camp assistant
  • i deleted the boot camp partition via the boot camp assistant
  • my disk didnt got back the 150 GB space - LOST??

Solution:

  1. Allocate / Have some free space on the problematic partition where you lost the capacity
  2. create new partition on the problematic partition by disk utility... select problematic disc / partition, "partition" button, "+" button, select a capacity (i have selected 40GB, if you were wondering) and apply or confirm it.
  3. after completion the new partition the system creates the new partition AND (here comes the magic part) the original partition gets the lost space back
  4. simply remove the newly created partition, and you have the old good partition at capacity with the "lost" capacity.

All was done in normally booted macOs, no recovery mode etc was needed, no data lost.

Don't ask me why or how it works, it just did work in my case.

You must log in to answer this question.

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