There are several ways to remove your files from your Macintosh before selling it or giving it to someone else. Usually you would do this after running the Migration Assistant and transferring your files to a replacement computer.
Before you delete files, consider deauthorizing iTunes and other software.
Removing personal data
The simplest method is creating a new user account for the new person, then deleting the old account. This removes all your documents, email, bookmarks, contacts, calendars, settings, music, photos, movies, and passwords. You’ll retain the Mac OS X that runs the computer, as well as all apps and files in other user accounts. Click for instructions.
Deleting all user files, apps, everything
As an alternative, you can completely wipe out everything on the computer and load only what comes from the factory.
- Turn off the computer if it’s already running.
- Hold down the Command and R keys as you turn it on.
- When you see the gray Apple logo, let go of the keys.
- Before installing any software, go to the Utilities menu and open Disk Utility
- Select your hard drive on the left and click the Erase tab.
- Click the Erase button (or Erase Free Space if you have very sensitive information).
- Quit Disk Utility.
- Choose the option to install OS X.
- Proceed with installation of OS X so the computer will be usable.
- After restarting, the Setup Assistant starts.
- Turn off the computer by holding down the power button. Or create a new user account (possibly User with no password).
Read Apple’s tips for reinstalling your macOS here.
Learn more about transferring files and backup.