Whether you’re looking to buy a new iPhone or have your eye on one of the best Android phones, you must wipe your old phone before you can sell it or pass it on. Your old phone is likely packed with precious memories, so make sure you back up or transfer everything (especially photos) before you follow this guide to reset it. A factory reset will remove any personal data and return the phone to the state it was in when you first took it out of the box.

There are various ways to trade in or sell your old iPhone or Android phone, but you must wipe it properly first. This isn’t just about late-night texts or embarrassing selfies falling into the wrong hands; failing to factory reset could land you in a world of pain. If you don’t log out and remove accounts, you may miss new incoming messages, and factory-reset protection on Android phones can lock buyers out even after the device is wiped.

Updated April 2024: We verified the iPhone instructions, updated the instructions for factory resetting Android phones, and added some new screenshots.

How to Factory-Reset Your iPhone

Before you do anything else, back up your iPhone. Remember to use the backup function in specific apps (like WhatsApp) and to transfer codes from apps like Google Authenticator.

Next, it’s a good idea to unpair your Apple Watch if you have one. You can do this in the Watch app on your iPhone by going to the My Watch tab. Tap All Watches and choose the info button next to the watch you want to unpair before tapping Unpair Apple Watch.

To avoid missing messages if you plan to switch from iPhone to Android, dip into Settings > Messages and toggle iMessage off. With that done, remove the SIM card from your iPhone.

We used to recommend turning off Find My iPhone and logging out of your Apple ID, but Apple has made this part of the factory reset process now, so folks with iOS 15 or later can skip this next step.