If you're asked to sign out of Apple ID, enter your Apple ID password and click Continue.Click Continue to allow your settings, media, data, and the other listed items to be removed.Or click Continue to proceed without making a new backup. If you're asked to back up your Mac before resetting it, you can open Time Machine and back up to an external storage device.
Enter the password you use to log in to your Mac, then click OK. Erase Assistant opens and asks you to sign in with your administrator credentials.From the System Preferences menu in the menu bar, choose Erase All Content and Settings.From the Apple menu in the corner of your screen, choose System Preferences.Otherwise, you'll see a message explaining that other volumes need to be erased before you can erase all content and settings on this Mac. If you used Boot Camp to install Microsoft Windows, use Boot Camp to remove Windows and its partition before continuing.