Resetting the Mac to its factory settings is an option to prevent the threat on the information. Hence you must try to the methods before selling your Mac to Factory reset your system.
Create Backup of Data
Before wiping everything and restoring the Mac to its factory settings, it is advised to create a backup of the data stored in Mac. The backup will keep all the files which you can access later in the new Mac system. The Time Machine facility will let you create the backup of data. Hence before resetting to the factory settings, you must create a backup.
Deauthorize iTunes
Since the company has provided an option to run the data on up to 5 other Mac systems, it is required to deauthorize the iTunes.
Reformat Hard Drive
You created the back up of your device and chose the Deauthorized This Computer option, now it is time to reformat the hard drive.
Erase Touch Bar Data
When you are logged out of all the accounts in Mac, you can clear the Touch Bar information of your Mac.
Reinstall new Mac Operating System
Once the reformatting of the drive is done, it is required to reinstall the Mac operating system.
AS you have followed the methods, now your Mac is ready to use from the beginning. With a clean operating system installation, the new owner can begin to use it from the default basics of Mac. It means the Mac will start with the instructions for a new owner and there would be no previous data stored in the system.
John Morrison is a Microsoft Office expert and has been working in the technical industry since 2002. As a technical expert, John has written technical blogs, manuals, white papers, and reviews for many websites such as office.com/setup
Source : https://officeinstall-setup.com/how-to-factory-reset-your-mac/