To enter Recovery Mode on an Intel-based Mac, restart it and immediately press and hold Command-R. You need to put your MacBook into Recovery Mode in order to erase all of your data and reinstall macOS.
Guide on how to successfully reset your MacBook Pro That’s it! Your Mac’s NVRAM has been reset. You can release the keys after 20 seconds or so. To do so, shut down your Mac, then turn it on and immediately press and hold four keys together: Option, Command, P, and R. Sometimes these files can get corrupted, so give your Mac’s next owner a fresh start by resetting the NVRAM. NVRAM is the memory to which your Mac saves settings that it needs before loading MacOS: things like screen resolution, time zone, volume level, and startup-disk selection. Go to System Preferences > Bluetooth, mouse over the device you want to unpair, click the X button to the right of its name, then click Remove. If you’re handing down your old Mac to your kid or someone else in your house, then it’s a good idea to unpair any Bluetooth devices from it so your mouse or keyboard controls the new Mac and doesn’t interfere with the old one. Unpair all Bluetooth connections on your MacBook before you factory reset a MacBook pro. Unpair all bluetooth connections on your MacBook Open the Messages app, go to Messages > Preferences, click the iMessage tab and then click Sign Out. Lastly, you’ll need to sign out of Messages. After migrating your data to your new Mac or making one last backup to preserve your data, it’s time to remove all traces of yourself from the machine. Sign out of your accounts on your MacBook before you factory reset a MacBook pro. Sign out of your accounts on your MacBook
A window will then appear giving you the option to reinstall macOS > select Install macOS.Select Quit Disk Utility in the Disk Utilities menu.Change the Format to macOS Extended (Journaled) > select Erase again Make sure the ‘Macintosh HD’ startup disk is highlighted in your Disk Utility window > select Erase.When you see a Recovery Mode menu, select Disk Utility.Once you see the Apple logo appear, release the ‘ Command and R keys’.While the computer restarts, hold down the ‘ Command‘ and ‘ R‘ keys.Restart your computer: hold the power button > select Restart when it appears.(Make sure you backup your computer and log out of your accounts, such as iCloud and iMessage, before doing so.)