Remember, if you’re erasing all content, you’ll also be erasing your phone from Find My iPhone and whatever is in your iCloud account. The best way to do this is to go to your Settings > Tap ‘general’ > Choose ‘reset’ and select ‘erase all content and settings’