How to remove a partition that fails to remove.
A pretty decent method to remove a partition is using a saw:



In the above example the repairman forgot to dismantle the disk properly and all partitions were lost.

Smaller saws like a precision mechanical saw reduce the risk of cutting away your precious OS X partitions.

So to delete the partition you have to remove the hard disk from your Mac and disassemble it to expose the platters. Usually the disk color indicates the position and the type of the partitions:

 

In the example above the Ubuntu partition is the orange one, the Ubuntu swap partition is in lighter orange and just to illustrate an additional Windows volume (which I added before): it's the lighter blue one. The silver white part of the disk are the main OS X partition and the Recovery HD. To remove the Ubuntu partitions simply cut off both orange segments.

Other known color codes are:


Mixed orange/blue: Solaris
Red: Redhat
Light Green: Linux Mint
Colorful: older Windows versions


After removing the Ubuntu partitions the disk will be slightly unbalanced. Visit your local tire repair shop to get it rebalanced similar to a car wheel.



If your internal disk is an SSD the approach is similar. The dyeing of the Flash-memory chips indicates the partition type. You don't need a precision saw though - a temperature-controlled soldering iron will be sufficient. To remove the Ubuntu partitions unsolder the orange chips. A rebalancing is not necessary because usually there are no rotating items in the SSD.