How to Erase All Data On iOS
You can remove all settings from your iPhone, iPod touch and iPad by tapping Erase All Content and Settings. To do this, tap Settings – General – Reset – Erase all Content and Settings. This procedure will wipe all settings and content from your device.
Before removing all settings and information, ensure that you have an iCloud or iTunes backup and that it is up to date, just in case you wish to recover the data again at a later time.
When you select to Erase All Content and Settings, the process can take from a few minutes to several hours depending on your specific iOS device.
If you are using a device that supports iOS 5 or later, the process is very quick. These devices erase all data simply by removing the encryption key that protects the data. However, in earlier versions of iOS, the devices overwrite memory, user settings and information by writing a series of ones to the data partition. This process can take several hours and depends largely on the storage capacity of your iPhone or iPod touch.
Don’t forget to connect your device to a charger and leave it connected until the process is complete. But If you run out of power or reset your device before it is complete, you will see the Connect to iTunes screen after you connect to power again. If this happens and you want to ensure that your content is fully erased, you must restore the device using iTunes. If your iPhone wasn’t able to remove all the settings and data due to some technical issues, select the Erase All Content and Settings option again.
While erasing data, your device will display the Apple logo as well as a progress bar on its screen.