September 10, 2012, 1:37 PM — Here's how you can delete all data and apps to get your iPhone ready to be sold.
1. Open the Settings app.
2. Go to General.
3. Scroll down and tap Reset.
4. Tap the Erase button.
All of your apps and data will be removed. You can then safely sell your iPhone.