Follow these steps to securely erase all data and settings on your Mac, returning it to factory defaults:
Step 1: Backup Important Data
Before proceeding, ensure you have backed up any important files, as the wipe process is irreversible.
Step 2: Sign Out of iCloud
Go to Apple Menu > System Settings (or System Preferences on older macOS versions).
Click your Apple ID or iCloud, and select Sign Out.
Follow prompts to confirm.
Step 3: Restart in Recovery Mode
Click the Apple Menu and select Restart.
Immediately press and hold Command (β) + R as your Mac restarts to enter Recovery Mode.
Step 4: Erase the Disk
Once in Recovery Mode, open Disk Utility.
Select your primary disk (usually labeled "Macintosh HD").
Click Erase.
Choose the format APFS (recommended for recent Macs) and confirm by clicking Erase again.
Step 5: Reinstall macOS
Exit Disk Utility to return to the macOS Utilities screen.
Select Reinstall macOS and follow on-screen instructions to install a fresh version of macOS.
After completion, your Mac will restart to a setup screen, ready for new configuration or resale.