So you're looking to sell your old iPhone and want to make sure all your personal data is completely wiped from it. To do a factory reset, go to the settings app, then general, and scroll down to transfer or reset iPhone. From there, select erase all content and settings, and enter your Apple ID password to disable activation lock. This will completely wipe your iPhone, removing all your data, apps, and settings, restoring it to its original factory condition. It's also a good idea to remove the SIM card and any other accessories before selling it, just to be safe.