While you are upgrading to a new iPhone or iPad, all the data in the current phone is essential and should not be left in the old phone. Whether you want to update your iPhone, iPod touch, or iPad as per the current update or you want to sell or give it away to somebody completely, you first need to make sure you have deleted all of your data, including your files, messages, and photos. It only takes a few simple steps, and a few minutes, and it makes sure you're data is protected.
Steps to back up your iPhone or iPad before erasing all the data
Before you attempt to erase all the data or anything else make sure you backup up to date data of your iPhone. iCloud performs a backup automatically overnight, as long as you are connected on a Wi-Fi, but a manual backup will make sure you are thoroughly up to date.
Step 1:If your device is low on power make sure you plug-in the device and charge it.
Step 2:Make sure your iPhone or iPad is connected to Wi-Fi.
Step 3:Launch Settings from the Home screen.
Step 4: Tap on the Apple ID banner at the top.
Step 5:Tap iCloud.
Step 6: Scroll down, tap iCloud Backup.
Step 7:Tap the switch to turn it on.
Step 8:Tap Back Up Now.
Now sit back and wait for a while until your iPhone backup process to complete before moving to the next step.
Steps to erase all data from your iPhone or iPad
iOS devices are hardware encrypted as long as you use a passcode. This implies making your data inaccessible, it is as simple as throwing away the encryption key. iOS will still erase everything and restore you to the setup process so that you have a clean device to start over with or sell.
Step 1: Launch the Settings app from the Home screen of your iPhone or iPad.
Step 2: Now tap on General.
Step 3: Scroll to the bottom and tap on Reset.
Step 4: Tap on Erase All Content and Settings option.
Step 5: Tap on Erase Now.
Step 6: Enter your Passcode.
Step 7: You need to enter your Apple ID password to turn off the Activate Lock option and remove the device from Find my iPhone.
Once the erasing process is completed, you can set up as a new device, revive from a different backup, or give or sell your iphone to someone else without worries.