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 Books if needed
If using macOS Monterey or later on Apple silicon or T2 Mac, open System Settings
Go to General
Select Transfer or Reset
Choose Erase All Content and Settings
Follow the on-screen prompts to erase the Mac
If your Mac does not have Erase All Content and Settings, restart and hold Command and R
Release the keys when the Apple logo or recovery screen appears
In macOS Recovery, open Disk Utility
Select the startup disk
Click Erase
Quit Disk Utility
Choose Reinstall macOS
Follow the on-screen instructions to complete installation
Set up the Mac as new or shut it down for the next user
