Cancel or transfer AppleCare cover
Use Erase All Content and Settings, if available
Back up or transfer your files
Sign out of iTunes
If using macOS Catalina or later, skip this step.
From the menu bar in iTunes, choose Account > Authorisations > Deauthorise This Computer. Enter your Apple ID and password and click Deauthorise. Find out more about deauthorising.
Sign out of iCloud
macOS Ventura or later: Choose Apple menu > System Settings, then click your name (Apple ID) in the sidebar. On the right, scroll down and click Sign Out.
macOS Monterey, macOS Big Sur or macOS Catalina: Choose Apple menu > System Preferences, then click Apple ID. Select Overview in the sidebar, then click Sign Out.
Earlier versions of macOS: Choose Apple menu > System Preferences, click iCloud, then click Sign Out.
When asked whether to keep a copy of your iCloud data on this Mac, you can keep a copy, because you will erase your Mac later. Your iCloud data remains in iCloud and on other devices that are signed in to iCloud with your Apple ID.
Sign out of iMessage
From the menu bar in Messages, choose Messages > Settings (or Preferences). Click iMessage, then click Sign Out.
Optional: Unpair Bluetooth devices
If your Mac has been paired with a Bluetooth keyboard, mouse or other device that you’re planning to keep, you can unpair it. This optional step prevents any accidental input when the Mac and device have separate owners but remain within Bluetooth range. If you do this on a Mac that doesn't have a built-in keyboard or trackpad, you will need to plug in a USB keyboard and mouse to complete the remaining steps.
To unpair a Bluetooth device, choose Apple menu > System Settings (or System Preferences), then click Bluetooth. Move your pointer over the device that you want to unpair, then click the Disconnect button or remove button (x) next to the device name.
Erase your Mac and reinstall macOS
Reset NVRAM and shut down
Turn on your Mac and immediately press and hold these four keys together: Option, Command, P, R. Release the keys after about 20 seconds. This will clear user settings from the memory and restore certain security features that may have been altered previously. Find out more about resetting NVRAM.
After resetting NVRAM, your Mac will start up to the setup assistant again. To leave the Mac in an out-of-box state, press Command-Q to shut down instead of continuing setup.
Irrespective of the model or condition of your device, we can turn it into something good for you and good for the planet: Find out how to trade in or recycle your Mac with Apple Trade In.