Before you do so, though, it’s probably worth backing up your data first, both so that nothing is lost and you can easily transfer it back onto another device later. Here are two ways of doing so.
Backing up your device with iCloud
- Connect to a Wi-Fi Network
- Access the Settings app, click on your name, and tap iCloud
- Tap iCloud Backup, then Backup Now. Stay connected to your Wi-Fi for this
To make sure this is complete, go back to Settings, your name, iCloud, iCloud Storage, Manage Storage, and then find the right device. For earlier updates, go to Settings, iCloud, Storage, Manage Storage. You should be able to see when the last backup was performed
Backing up your device with iTunes
- With iTunes open, connect your device to your computer. It may ask you to confirm your passcode
- Select the device which you want to backup. A summary screen will appear
- Under the heading Backups, select Back Up Now
To make sure this is complete, go to iTunes Preferences and then Devices for Mac, and Edit and then Devices for Windows. Your device as well as time and date of the backup should appear
Erasing your device
- If you have one, unpair your Apple Watch from your device
- Make sure your device has been properly backed up
- Sign out of iCloud. To do this on iOS 10.3 or later, go to Settings, your name, scroll down and tap Sign Out, enter your Apple ID password, and click Turn Off. For devices running iOS 10.2 or earlier, go to Settings, iCloud, then tap Sign Out. Press Sign Out again, then Delete From My Device, and enter your Apple ID password. Back in Settings, go to iTunes and App Store, Apple ID, and then proceed to Sign Out.
- Once completely signed out, return to Settings, go to General, tap Reset, and then Erase All Content and Settings. You may be required to enter your Apple ID password again.
- Enter your passcode if the device asks you to, and then tap Erase
In following these procedures, your phone should be restored back to its factory settings. All of your personal data will have been backed up and then wiped from your device, meaning you’re safe to sell it on.