Back up any important files
Sign out of iCloud
Sign out of iMessage
Sign out of FaceTime
Deauthorize the Mac in Music or iTunes
Restart the MacBook Pro
Hold Command and R immediately after hearing the startup chime
Release the keys when the Apple logo or Utilities screen appears
Select Disk Utility
Choose the internal hard drive or SSD
Click Erase
Format the drive as Mac OS Extended (Journaled) or APFS if available
Confirm the erase
Quit Disk Utility
Select Reinstall macOS from the Utilities window
Follow the on-screen instructions to reinstall macOS
Complete setup or shut down the Mac if you are preparing it for sale or transfer
