If you know the iPhone passcode, go to Settings > General > Transfer or Reset iPhone > Erase All Content and Settings
If prompted for Apple ID during erase, you must enter the Apple ID password to turn off Activation Lock
If you forgot the Apple ID password, reset it at iforgot.apple.com
If you can’t reset the Apple ID password, contact Apple Support with proof of purchase
If the iPhone is signed in to Find My, remove it from the Apple ID account at iCloud.com/find or the Find My app after signing in
If you do not know the passcode, put the iPhone into recovery mode and restore it with a computer using Finder or iTunes
After restoring, Activation Lock will still require the Apple ID and password that were previously on the device
If the iPhone was purchased used, ask the previous owner to remove the device from their Apple ID account
If the device is supervised or managed by an organization, contact the organization’s IT administrator
If you cannot provide the Apple ID password and cannot remove Activation Lock, the iPhone cannot be fully reset for use
