Are you planning to switch to a new iPhone or sell your iPhone to someone? If yes, you need to ensure that you erase all your login details and other data. It can be noted here that when you delete data, it is no longer accessible through the iPhone interface, but it is not erased from iPhone storage. To remove all of your content and settings from storage you will have to erase iPhone. Also, if you want to save your content and settings, back up iPhone before erasing it. You can erase iPhone from Settings . If you are unable to open Settings, you can use a computer too in order to erase iPhone. Check details here.
1. You will have to go to Settings then tap on General and finally click on Transfer or Reset iPhone. If you are erasing your iPhone because you are replacing it with a new iPhone that you have on hand, you can use extra free storage in iCloud to move your apps and data to the new device. Tap on Get Started, follow the onscreen instructions, then return to Settings, click on General and then Transfer or Reset iPhone.
2. Tap Erase All Content and Settings
When iPhone restarts with all content and settings erased, you have the option to set up iPhone as new or restore it from a backup.
You can use a Mac or Windows PC to erase all data and settings from your iPhone, restore iPhone to factory settings, and install the latest version of iOS. If you cannot open Settings on iPhone, you can use this approach to restore iPhone to factory settings.
Connect iPhone and your computer with a cable then do one of the following:
On a Mac: In the Finder sidebar, select your iPhone, click General at the top of the window, then click Restore iPhone. According to Apple, to use the Finder to restore iPhone to factory settings, macOS
Read more on tech.hindustantimes.com