How to factory reset your iPhone, iPad or iPod touch
Find out how to 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.
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.

Choose to keep or delete your eSIM. If you erase your eSIM, you’ll need to contact your network provider to reactivate your mobile plan.

Enter your device passcode.
Enter your Apple Account password.
Wait for your device to be erased.
After the restore process has finished, the Hello screen will appear on your iPhone.
If you can’t erase your iPhone, iPad or iPod touch
Find out what to do if you can’t remember your passcode for your device, or if you disable your device.
Find out what to do if you’ve forgotten your Apple Account password.
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.