iPhone Factory Reset
Once you've backed up your data and turned off iCloud and Find My, you're good to go. Follow these steps to factory reset your iPhone to its original state: Press Settings. Scroll down and tap General. Scroll to the bottom and tap Reset. On the Reset screen, tap Erase all content and settings. Three iOS screens showing the General button, the Reset button, and the Erase all content and settings link If prompted, enter the access code configured on your phone. The screen displays a warning that all music, other media, data, and settings will be erased. Touch Delete to continue. If you don't want to restore the phone to its factory default state, tap Cancel. It takes a few minutes to remove everything from the iPhone. When the process is finished, the iPhone restarts and the iPhone has been reset to factory settings.