I have a partition (disk0s2) I can't seem to get rid of. The size is very tiny around ~3KB. Disk Utility is unable to remove/erase or repair this partition. Also, the '-' button seems to be disabled. Can anyone help me with a terminal command to get rid of the partition? enter image description here enter image description here enter image description here

  • You can’t remove (or edit) a partition from a disk that’s mounted. You have to do this in Recovery or from a macOS booted from a different drive (like USB). What makes you think it’s corrupt?. Do you know what’s on it? Did you make a backup of your drive?
    – Allan
    Jan 22 '20 at 16:31

I solved this by using the command:

diskutil eraseVolume "Free Space" %noformat% disk0s2

You must log in to answer this question.

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