How to factory reset your iPhone, iPad, or iPod touch
Learn how to erase information from your iPhone, iPad, or iPod touch and restore your device to factory settings.
If you also need to securely erase your Apple Watch, you can use these steps to unpair your devices.
Create a backup.
Create a backup. You can restore content, settings, and apps from this backup to a new or newly erased iPhone.
Erase and reset your device.
Go to Settings.
Tap General.
Tap Transfer or Reset [device].
Tap Erase All Content and Settings.

Tap Continue.

Keep or delete your eSIM. If you erase your eSIM, you need to contact your carrier to reactivate your cellular plan.

Enter your device passcode.
Enter your Apple Account password.
Wait for your device to erase.
Once the restore process finishes, the Hello screen will appear on your iPhone.
If you can't erase your iPhone, iPad, or iPod touch
Learn what to do if you don't remember your passcode for your device, or if you disable your device.
Learn what to do if you forgot your Apple Account password.
If you forget your Screen Time passcode, you can reset it. Restoring your device using a backup won't remove the Screen Time passcode.