Find out how to securely erase information from your iPhone, iPad or iPod touch and restore your device to factory settings.
If you also need to erase your Apple Watch securely, you can follow these steps to unpair your devices.
Make sure you back up your device so you can restore your data later.
Go to Settings > General > Transfer or Reset iPhone.
Tap Erase All Content and Settings.

Forgotten your passcode or Apple Account password?
If you have an eSIM, you can choose to erase your eSIM or keep it.
If you erase your eSIM, you’ll need to contact your network provider to reactivate your mobile plan.

It may take a few minutes to erase your data completely.
Find out what to do if you can’t remember your passcode for your device, or if you disable your device.
If you’ve forgotten your Screen Time passcode, you can reset it. Restoring your device using a backup won’t remove the Screen Time passcode.