When preparing to sell your Macbook, it is best to delete all personal files from your hard drive, restore your computer to factory settings, and reinstall the system before handing it over to the customer. To restore your Macbook, you need an Internet connection.
Steps
Part 1 of 2: Formatting your hard drive

Step 1. Restart your Macbook
To do this, click on the Apple logo in the upper left corner and select “Restart” from the drop-down menu.

Step 2. When the gray reboot screen appears, press and hold the Command + R keys. 3 Select the desired network from the list of available Wi-Fi networks

Step 4. Go to “Disk Utility”

Step 5. Erase the hard drive
Select the drive you want and click “Erase”.

Step 6. In the new window select “Mac OS Extended (Journaled)”

Step 7. Name the section as you wish

Step 8. Click on the "Erase" button
Formatting of the disc will begin.
Part 2 of 2: Reinstalling the operating system

Step 1. Close "Disk Utility"
To do this, while in the program, click on the “Disk Utility” menu and select “End Disk Utility”.

Step 2. Select to reinstall the system and click on the "Continue" button
