What steps do I need to take before selling or giving away my old Mac?

It's perfectly safe to sell on a Mac second-hand (or pass it on to a friend or relative), provided you take some basic precautions. (Well, if you've been storing state secrets or billion-pound business-critical data on there, you might want to get in some specialist help. The following tips are for the rest of us!)

Before you sell your Mac second-hand, you should clean it both inside and out. Here are the most important steps you should take before selling or giving away an old Mac.

Read next: Best Mac buying guide 2017 | How to sell an old Mac

How to prepare an old Mac for sale: Transfer data off the old Mac

First things first: you need to make sure any important data has been moved to your new Mac (or PC, if you're swapping sides!).

The easiest way to transfer data from Mac to Mac is to use Migration Assistant, which will make its presence known when you set up your new Mac. To transfer data between the two Macs, you must have either a FireWire connection or a network connection. FireWire will be faster.

We look at this process in much more detail here: How to transfer all files from one Mac to another

How to prepare an old Mac for sale: De-authorise the Mac from iTunes

If you've used your old Mac to purchase any content from the App Store, iTunes Store and so on, be sure to open iTunes on it and choose Deauthorise This Computer from the Store menu. That way you won't lose one of your five authorisations when you wipe the old Mac's drive.

How to prepare an old Mac for sale: Turn off Find My Mac

Open System Preferences, then select iCloud. Scroll down to the bottom of the list, where you'll see Find My Mac. If it's got a tick next to it, click this to remove the tick.

How to prepare old Mac for sale: Turn off Find My Mac

How to prepare an old Mac for sale: Sign out of iCloud

In the same options pane (System Preferences > iCloud) you'll see the option to Sign Out at the bottom left of the window. Click this, then confirm Delete From Mac when macOS checks you're okay with deleting iCloud-stored documents from this machine.

How to prepare old Mac for sale: Sign out of iCloud

How to prepare an old Mac for sale: Format the hard drive and reinstall macOS (or OS X)

Once your data is ensconced on the new MacBook and your iTunes account is clear, you can wipe the old Mac's drive by inserting your original installation disc, booting from it (restart and hold down the C key), and choosing Disk Utility from the Installer menu. Within Disk Utility, select the Erase tab and, in the resulting pane, click on the Security Options button.

In the pane that appears, you have the option to wipe your drive's data in a number of ways, including Zero Out Data, 7-Pass Erase, and 35-Pass Erase. Zero Out Data will nicely wipe your drive, but if it will help you sleep better at night, feel free to choose one of the other options (note that they can take quite a long time to do their thing).

When Disk Utility finishes wiping the data from the drive, run the installer again to install a clean copy of OS X. When the Mac reboots and prompts you to set it up, just press C-Q to quit the installer. This ensures that you leave no traces of yourself on the old Mac and that the new owner can set it up to their liking. Don't worry about installing any operating system updates on the old Mac. The new owner can check for available updates via Software Update.

Read more: How to reset a Mac

How to prepare an old Mac for sale: Physical cleaning

Last of all, you should also take time to clean the computer, and check to see if you have any original box or packaging. The more presentable the Mac looks in its photographs, and the more original packaging you have, the more it will fetch on the second-hand market.

Additional reporting by Christopher Breen