Before you start camping out in the mile long line at the store you're going to buy your new one from, follow these simple steps to make sure that every trace of you and your life has been wiped from the phone:
1. Make a Backup of your iPhone's data
You may not have synced your iPhone to your computer for awhile so you may not have a current back up. If your getting a new iphone you will want to make sure that your old one is backed up so that when you restore the data to your new phone, everything will be current, and you won't have to start from scratch.
Depending on which version of iOS your using and your sync preference settings, you will either backup to your computer or the iCloud service.
Currently the iCloud service will backup almost everything that you need to restore your iPhone, but it is possible that some apps may not support backup to the iCloud. Also, some older phones such as the original iPhone and iPhone 3G don't have access to the iCloud service so we'll backup using the iPhone's docking cable. For more information about the iCloud method checkout About.com's iPod / iPhone site.
1. Connect your iPhone to the computer you normally sync it with.
2. Open iTunes and click on your iPhone from the left-hand navigation pane.
3. From the iPhone's page on the right side of the screen, click the "Back up to this computer" check box.
4. Right-click the iPhone from the window pane on the left side of the screen and click "Back Up" from the pop-up menu.
Note: If you have purchased some items on your phone and haven't transferred these purchases to your computer yet, right-click the iPhone and choose "Transfer Purchases" to transfer the purchases prior to backup.
Make sure the back up process succeeds before performing the following steps:
2. Erase all your iPhone's data and settings
Since you don't want whomever gets your phone to have access to your personal data you'll need to wipe the phone clean of all of your personal data. Follow these instructions to clear the data off of your phone.
1. Tap the settings (gear icon) from the home screen (or whatever page it happens to be located on your iPhone).
2. Tap the "General" settings menu item.
3. Choose the "Reset" menu item.
4. Tap on the "Erase All Content and Settings" menu item.
The process can take anywhere from a few minutes to several hours, so it's probably something that you don't want to do while your waiting in line to trade your phone in.
I found the hard way that just because you wiped your iPhone's data doesn't mean that everything linking you to the phone has been removed. There are some apps that may still be linked based on your phone's unique hardware ID. I sold an old iPhone to a friend of mine and completely wiped my data using the method above, however, he informed me that my Pandora account was still linked as he was seeing all of the Pandora channels I had created. He said that the same was true for several other apps as well.
If you use any apps that allow you to authenticate based on your iPhone's unique hardware ID, you should visit the apps websites to unlink the phone to your account. You can link your new phone to your account after you install the apps on your new iPhone.