How to Remove All of Your Personal Data from Computer
Just like Windows users, Apple users also need to create a suitable backup before they perform a factory reset. Apple users can copy their important files to an external drive or to cloud storage. However, make sure that you disable iCloud features after you have backed up your files and folders.
Now you have to restart your computer and during startup, press the Shift + Option + Command + R keys until the Apple logo appears. The key combination forces your computer to reinstall your operating system and restart your computer when it was first removed.
Now you will see a pop-up window in which you need to open the corresponding disk. Now on the corresponding drive, find the built-in hard drive and erase. Now select the MacOS Extended (Journaled) format. Now wait until the Disk Utility completes the reset process. Once finished, the fastest disk utilities.
How to Wipe the hard drive before selling your apple computer