It applies to macOS Big Sur (11) through OS X Yosemite (10.10).
Here’s how to create a backup using Time Machine:
Connect an external storage machine to the Mac.
Click theApple iconin the upper-left corner of the screen.

Select yourexternal driveand then clickEncrypt backupsandUse Disk.
After you clickUse DiskorON, Time Machine begins a backup of your MacBook Air.
As such, you might want to consider downloading afree third-party backup appsuch as SuperDuper or Carbon Copy Cleaner.

ClickApple ID/Apple Accountin macOS Catalina (10.15) and later.
(In earlier versions, clickiCloudinstead.)
ClickOverviewandSign Outin macOS Catalina (10.15) and later.

(In earlier versions of macOS, selectSign Out.)
Scroll up to the menu bar at the top of the MacBook Air’s screen and clickAccount.
How to Sign Out of Messages
fire up the Messages app.

ClickMessages(in the menu bar at the top of the Mac’s screen).
Click theSign Outbutton, which is to the right of your Apple Account.
Next comes the actual step of resetting it.

You first need to boot up your Mac in Recovery Mode.
After the Apple logo appears and it’s finished starting up, you are shown theUtilitieswindow.
It’s here that it’s possible for you to erase your hard disk and perform the reset.

Here’s how you do it:
ClickDisk Utility.
ClickView>Show All Devices.
Select yourhard driveand clickErase.

In the Format field, choose theAPFSoption on macOS High Sierra or later.
On macOS Sierra or earlier, choose theMac OS Extended (Journaled)option.
There is no Undo feature for erasing theSSDin your MacBook Air.

Take care and see to it you’ve backed up all your data before clickingErase.
Next, you’llwipe your MacBook Air’s hard driveclean.
It can take several minutes to complete.

TheErase Content and Settingsfeature lets you perform a clean reset without uninstalling the operating system.
To use this option, open System Preferences and then selectErase All Content and Settingsunder theSystem Preferencesmenu.
The most popular reason someone resets a MacBook Air is that they are selling it.

Another reason to reset a MacBook Air relates to solving performance issues.
This is a last-ditch strategy, but in many cases, it works well.
The steps forresetting a MacBook Proare basically identical to resetting a MacBook Air.

FAQ
Restart the MacBook and hold downOption+Command+P+Rfor about 20 seconds.
Enter yourApple Accountand follow the instructions.