Back up your data with Time Machine or another backup method
Sign out of iCloud
Sign out of Messages
Sign out of Music, TV, and other Apple services if needed
Restart your Mac
On Apple silicon Macs, press and hold the power button until startup options appear
On Intel Macs, restart and immediately hold Command-R
Open Disk Utility
Select the startup disk
Erase the disk
Quit Disk Utility
Choose Reinstall macOS
Follow the on-screen instructions
Complete setup, or shut down if you are selling or giving away the Mac
