Back up your data (Time Machine or another backup method)
Sign out of iCloud on the MacBook Air
Apple menu → System Settings → Apple ID → Sign Out
Sign out of other accounts (if applicable)
Apple menu → System Settings → [your name] → Media & Purchases → Sign Out
Restart the MacBook Air
Enter Recovery Mode
Intel Mac: immediately hold Command (⌘) + R during startup
Apple silicon (M1/M2/M3): hold the Power button until startup options appear, then select Options → Continue
In Recovery, open Disk Utility
Select Disk Utility → Continue
Erase the internal drive
Select the internal drive (usually “Macintosh HD”)
Choose Erase
Set Format to APFS
Set Scheme to GUID Partition Map
Click Erase
Quit Disk Utility
Reinstall macOS
Select Reinstall macOS → Continue
Choose the erased drive as the installation destination
Follow the prompts to complete installation
After installation, complete setup
If you’re keeping it: set it up normally
If you’re selling/giving it away: stop at the setup screen and do not sign in
