Well so far "diskutil eraseVolume" is a no-go, as well as "newfs_hfs". To be completely fair they blank that partition, but don't give you the ability to reclaim that space. At the moment I am working with some good old "dd is=/dev/zero of=/dev/disk0s3" magic. I'll get back to ya.
Looks like it is actually pretty simple...
Code:
diskutil list
sudo diskutil mergePartitions JHFS+ Macintosh\ HD disk0s2 disk0s3
This code will erase the Recovery partition, and merge the space back into the first partition. Note that if you have other partitions on the drive this will have to be changed to fit accordingly.
Diskutil list will tell you what the disk numbers are. This command assumes that you have ONLY disk0s1 as EFI, disk0s2 as the root, and disk0s3 as Recovery.
1. "JHFS+" is the format of the partition immediately preceding the Recovery partition, as in Journaled HFS+.
2. "Macintosh\ HD" is the name of the Mac partition. Any space in the name needs the "\" so Terminal can escape the space.
3. "disk0s2" is the disk number of the partition immediately preceding the Recovery partition.
4. "disk0s3" is the disk number of the Recovery partition.
Change these 4 variables to fit your setup.