First make the bootable usb:
https://forums.macrumors.com/threads/1801963/
Then boot up startup manager with option key.
Then select the usb and bootup from that.
There will be a disk utility there. Use that to erase the drive.
Then quit disk utility and install yosemite to the newly formatted drive.