Before selling or giving away a device, remove your personal information. Do not manually delete contacts, calendars, documents, reminders, photos or other iCloud data while signed in with your Apple ID. The source then states that the procedure below deletes content from iCloud servers and connected devices; this wording conflicts with the distinction between manual cloud deletion and correctly erasing a signed-out device and must be reviewed before use.
Follow these steps:
1. Back up the iOS device. If you do not know how, click here.
2. Open Settings on the device and tap iCloud. Scroll down and tap Sign Out. On iOS 7 or earlier, tap Delete Account.
3. Tap Sign Out again, then Delete from iPhone, and enter the password.
4. Return to Settings, then General, Reset, Erase All Content and Settings. If Find My iPhone is enabled, you may need to enter your Apple ID and password.
5. If prompted for the device or Restrictions passcode, enter it, then tap Erase.








