Hello gsrkashyap,
Thanks for using Apple Support Communities.
If I understand the issue correctly, you had initially erased your Macintosh HD partition, and replaced it with a Linux installation. If you want to restore back to OS X, you will need to erase and reformat the current partition to Mac OS Extended (Journaled), and restore from your Time Machine backup. In the first article below, only go to step 5, as you will then need to follow the directions in the second article to recover your entire system.
OS X Yosemite: Erase and reinstall OS X
OS X Yosemite: Recover your entire system
Take care,
Alex H.