I overwrote OSX with Linux by accident
It sounds like you don't have a backup of your original OS X setup, and since you also likely don't have the Recovery partition, you can reinstall in the following way from scratch (assuming you have a relatively recent machine):

See How to use macOS Recovery for reference - but the relevant steps are below:

macOS / OS X Internet Recovery


Restart your Mac, and hold down Command + R at startup until the Apple logo appears. 


After your computer finishes starting up, you should see a desktop with an OS X menu bar and an OS X Utilities window with the options listed above. If you see a login window or your own desktop instead of the Utilities window, it's possible that you didn't press Command-R early enough. Restart your computer and try again.

Choose the option you want to use from the Utilities window or the Utilities menu.

In order to reinstall OS X, you need to be connected to the Internet using Ethernet or Wi-Fi. If you're using a wireless Internet connection, click the Wi-Fi menu in the upper-right corner of the screen to select a nearby Wi-Fi network. Choose your preferred network name and enter a username and password to join the network if needed.