This is the output in Disk Utility:

Disk Utility cannot modify this disk because it contains CoreStorage physical volumes. Use command line distil instead.

The selected partition won't be changed.

How do I remove the partition?

It's completely empty now and I've cleared it by formatting it but I want to completely remove the partition and merge the free space back into the bigger partition.

I've tried doing this but it doesn't work in Terminal:

diskutil eraseVolume format name device

diskutil eraseVolume HFS+ awer disk1s4

It didn't work:

Started erase on disk1s4 asdf

Unmounting disk

Error: -69879: Couldn't open disk
  • From which partition are you trying to remove the partition (i.e. Did you boot from the same disk or are you booted from the installation disk)? Sep 2, 2011 at 7:39

4 Answers 4


Never mind - problem solved.

Turns out that the whole drive's partition table cannot be modified if one partition has encryption on, since CoreStorage is on. (The one that I had on was the encrypt feature for Time Machine.)

  • 7
    So how did you find which partition is encrypted, and how do you remove the encryption?
    – Adam Davis
    Dec 16, 2011 at 2:18

I had this same issue a few days ago, Go back into disk Utility and use the erase option rather than the Partition option. So select the drive you want to get rid off and select erase. Hope this helps Disk Utility


I was trying to securely erase a Mac SSD which I mounted with Target Mode (restart, hold down T, connect two Macs with Thunderbolt cable-- now your target computer just shows up as an external drive) using the commands from https://lifehacker.com/how-to-securely-erase-a-solid-state-drive-on-mac-os-x-1580603733 -- which are to overwrite all data twice, using Terminal:

diskutil randomDisk 2 /dev/diskN 

(btw, diskN means what number of disk, like disk0 disk1, etc. -- to find out your number, do

diskutil list


Doing that erase I got that same error number as OP. What I did to resolve it was go in to Disk Utility in my host computer then erase the contents of the connected drive that way. It objected and said there was an error. When I went back to terminal the "virtual" and unencrypted disk2 was gone, but I reran the erase command and now it's going.

Perhaps that might help with someone having partition issues.


As pointed out by JFW, the error is raised when trying to erase a CoreStorage encrypted device (e.g., encrypted by Time Machine). If you want to erase the whole drive you can solve the error on the terminal by:

diskutil cs list

Now find the Logical Volume Group' lvgUUID (the long hex number) that you want to erase. Re-check that all volumes in this group are safe to be deleted. If so you can delete the volume group with

diskutil cs delete lvgUUID

The disk will be erased, formatted as HFS Plus volume and re-mounted. You can use Disk Utility as usual to change the format.

You must log in to answer this question.

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