If you ever need to erase an iOS device completely, to return it (as I’m doing today with my iPhone 6), to exchange it, or to sell it, it’s a simple process, but you need to make sure you do it correctly. You can’t just wipe the device in iTunes, using the Restore function; that will still keep it linked to your Apple ID.
Go to Settings > General > Reset, then tap Erase All Content and Settings. You’ll see a dialog asking if you’re sure you want to do this; if you are, go ahead. The device will erase everything but the OS, and you’ll see the welcome screen that you saw when you first set it up, or first installed the latest version of iOS.
But there’s another thing you need to do. In iTunes, go to the iTunes Store, then to your account. In the iTunes in the Cloud section, you’ll see a Manage Devices entry. Click Manage Devices, then check to see if your iOS device is listed there. Reseting it should delete it from the list, but it may not. Since you can only have ten iOS devices linked to your account, you may be near that limit, if you have a couple of Macs, an iPhone, an iPad, and a couple of devices for your spouse, partner or children. If you find your device there, click Remove.
That’s it. You can now return, exchange, sell or give away your device.