Back up any important data
Sign out of iCloud
Sign out of Messages
Sign out of Music, TV, and App Store if needed
Shut down the MacBook Air
Turn it on and immediately hold Command-R
Release when the macOS Utilities window appears
Select Disk Utility
Click Continue
Select the internal startup disk
Click Erase
Choose APFS or Mac OS Extended if prompted
Confirm the erase
Quit Disk Utility
Select Reinstall macOS
Follow the on-screen instructions
Keep the Mac connected to power and Wi-Fi
Set it up as new or shut it down after installation
