Go to account.microsoft.com/devices. Next to the phone you no longer own, select Remove phone. Select the I'm ready to remove my phone check box, note the recovery key, and then select Remove. The recovery key will display on the page and will also be emailed to you.