I was unable to just delete the partitions left by an old Linux Mint installation by pressing the '-' button in disk utility. I looked online and read that I could reformat them to a journaled format from the command line and then delete it from disk utility. The command was something like
diskutil eraseVolume deleteme JFS+ /dev/disk0s4 (and then again for disk0s5, as there were two).
After this command, disk utility showed the two partitions had been reformatted, but I could now see the Recovery HD partition between the two deleteme partitions and the Macintosh HD partition, which meant I could not delete them without deleting the Recovery HD partition, which even I knew was a bad idea.
diskutil list and saw that my main partition was now showing the type 'FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFF', so I was pretty sure something had gone wrong. I backed up my home folder and rebooted to be successfully brought to the login screen, but when I try to log in, it loads for a while before showing me a black screen with a grey no-symbol.
Here are the results of
diskutil list and
gpt -r show /dev/disk0:
For the record I have a 13" Retina MacBook Pro mid-2014 version.