1. Head to icloud.com/find and sign in with your Apple account:
2. At the top of the page, click all devices and then click the device that needs to be removed:
3. Choose the option that says ERASE. You will need to confirm your Apple ID and Password:
4. You will need to choose a 6 digit code if you try to recover this device. This won’t be needed if you’re selling the device so that you can choose any 6 numbers. You will need to confirm your selection by re-entering the code. Then hit DONE:
5. It will take some time to erase. Then, click the X next to the device to remove it from the account and click REMOVE:
6. You’re done!