If you have forgotten your code or if you see a message stating that the device is disabled, follow these steps to delete the code.
If you enter the wrong code on an iOS device six times in a row, the device will be locked and a message will appear stating that the device has been disabled. Get information on what to do.
First, choose a way to erase the device
Unless you have backed up before forgetting the code, there is no way to save the device data. You will have to delete the content of the device, which will delete all data and settings. Choose a way to delete your device in order to delete the code:
- If you’ve synced to iTunes, use iTunes .
- If you’re signed in to iCloud and Search for my iPhone is turned on, use iCloud .
- If you do not use iCloud and can not sync or connect to iTunes, use recovery mode .
Delete device with iTunes to remove the code
If you’ve synced your device with iTunes, you can restore it. Doing so will erase both the contents of the device and the code.
- Connect the device to the computer with which you have synchronized.
- Open iTunes. If you are prompted for a code, try another computer with which you have synchronized or use recovery mode .
- Wait for iTunes to sync the device and perform a backup. If not, learn more about what you can do .
- Once synchronization and backup are complete, click Restore [device] .
- When you get to the setup screen during iOS device restoration, tap Restore iTunes backup .
- Select the device in iTunes. Check the date and size of each backup and select the one that suits you best.
Delete device with iCloud to delete the code
If you set Find my iPhone on your iOS device or Mac , you can use iCloud to erase the content and restore it. Doing so will erase both the contents of the device and the code.
- From another device, go to icloud.com/find .
- If prompted, log in with the Apple ID .
- Click All Devices, at the top of the browser window.
- Select the device you want to delete.
- Click Clear [device] to clear the contents of the device and its code.
- At this point, you can either restore a backup or configure the device as new .
If your device is not connected to a mobile or Wi-Fi network, you will not be able to delete it using Find My iPhone.
Delete device with recovery mode to delete code
If you’ve never synced to iTunes or configured Find my iPhone in iCloud, you’ll have to use recovery mode to restore the device. Doing so will erase both the contents of the device and the code.
- Connect your iOS device to your computer and open iTunes. If you do not have a computer, borrow one or go to an Apple Store or an Apple Authorized Service Provider .
- While the device is connected, force the reboot:
- On an iPhone 6 or earlier, iPad or iPod touch: press and hold the start and enable / rest buttons at the same time. Be sure to click on them when the Apple logo appears. Keep pressing until the Recovery Mode screen appears.
- On an iPhone 7 or iPhone 7 Plus: Hold down the on / off and volume down buttons at the same time. Be sure to click on them when the Apple logo appears. Keep pressing until the Recovery Mode screen appears.
- When the option to restore or update appears, select Restore.
- ITunes will download the software for the device. If it takes more than 15 minutes, the device will exit recovery mode and you will have to repeat steps 2 and 3.
- Wait for the process to complete. You can then configure and use the device.
If you can not update or restore the device in recovery mode or you can not use recovery mode because the buttons are broken or jammed, contact Apple Technical Support . Then follow these steps to set up the service for your iPhone, iPad, or iPod touch.