Clearing all of the data from your iPhone is simple.
- Go to Settings
- Tap on General
- Scroll all the way down and tap Reset
- Choose Erase All Content and Settings
- Enter passcode (if you’re using one)
- Select Erase iPhone (twice), confirming that you REALLY want to lose everything
Make sure you have it plugged in, as the process will take quite a long time, “about an hour” according to the warning. But, believe me, it is time well spent!
Once the process is complete, you’ll be left with a “factory fresh” installation of the iPhone OS with no trace of you or your data.