Solution 1:

Another cause of the "minus" button being greyed out in Disk Utility is that it doesn't allow you to delete the first partition on the disk.

Solution 2:

I've had the same issue in El Capitan. The instructions above which feature the old version of Disk Utility are obsolete as the new version (El Capitan and up) does not offer the same set of options.

That said, in order to remove the extra partition for which the minus button was greyed out, I simply rebooted into Recovery Mode (CMD+R during boot) and ran Disk Utility from there. The button was no longer greyed out.

Hope this helps!

Solution 3:

I solved this on my external drive using diskutil to merge the problem partition with a following partition. Update: Klanomath points out this won't work if you've booted from the disk you want to modify.

Note: Data will only be preserved on one of the partitions (the first mentioned in the diskutil mergePartitions ... command) so create a backup first if you need to.

Get a list of partitions on the drive. Leave out the disk identifier disk2 if you want to see all disks

diskutil list disk2

Merge the problem partition with the following partition giving the merged partition a name, say MyNewPartition

diskutil mergePartitions HFS+ MyNewPartition disk2s2 disk2s3

This results in all the data from disk2s3 being deleted and disk2s2 being extended into the space that was used by disk2s3

In my case the merged partition still could not be resized or deleted in Disk Utility but at least I had removed the unwanted partition.

Solution 4:

I booted osx from an external drive and used disk utility to select internal drive and erase the drive completely giving me back full disk space. probably back up first :)