How do I restore a Mac to its original macOS version? I've just followed the steps here to try to format my wife's laptop so we can sell it: https://superuser.com/questions/959422/reinstall-os-x-without-cd-dvd-or-apple-id

Unfortunately I'm still getting a message saying "to download and restore OS X, your computer's eligibility will be verified with Apple" and when I proceed further in the installation, it says "signing in to App Store" and there is nothing I can do but sign in.

It's my understanding that the Apple ID needs to have the relevant OS X paid updates (so in this case, El Capitan) so if we sell it in this state, wheover logs in with their own Apple ID won't be able to use it.

Any suggestions on how to restore it back to it's original state? Many thanks
FIRST: Please read What to do before you sell, give away, or trade in your Mac on Apple's website.

As for your question, it doesn't state what model MacBook you're trying to sell, so it's not clear if Mac OS X El Capitan is the original OS it shipped with.

However, your best bet is to boot into macOS Recovery using the ShiftOption⌘R keyboard shortcut. This keyboard shortcut is designed to install the version of macOS that originally shipped with your Mac.* 

To do this:


Fully shut down your Mac
Power up your Mac again but immediately press and hold the ShiftOption⌘R
Keep the keys down until you see either an Apple logo or spinning globe appear on screen (Note: If you have a firmware password set on your system, then let go of the keys when the password prompt appears)
Once the Utilities window appears you'll be in macOS Recovery Mode


Now choose to reinstall macOS and follow the prompts.

* For users of older Mac models this option will install the closest version of macOS still available to the original that shipped with it.