Many guides say that you need to put your device in recovery or DFU mode but that is not entirely true. In fact it is a lot easier than that. You just need to erase your device and then restore it from a backup. The backup won’t include the jailbreak or jailbroken apps, so you’ll be back to stock iOS.
To start, plug in your device into your computer and launch itunes, then click on the device icon in the upper-left corner to open up the device summary screen.
Make sure iTunes has all the movies and music you want on your device, since we’ll be erasing it shortly. Once you’ve done so, it’s time to back up your device’s apps and settings.
To back up your device, click on “Back Up Now”.
After that process is finished, open up the Settings app on your device, and navigate to iCloud > Find My iPhone. From there, disable Find My iPhone. You’ll only do this temporarily, as Apple requires this feature to be disabled when restoring your device.
Next, go back to iTunes and click on “Restore iPhone”.
You may receive a pop-up window asking if you want to back up your stuff, but since you already did this, just click on “Don’t Back Up”.
Click “Restore” when the next pop-up window appears.
The process will begin and will take around five minutes or so.
Eventually, you’ll see the below screen in iTunes when the process is complete. You can either select “Set up as new iPhone if you want to start from scratch, or select “Restore from this backup” to get back all of your apps, settings, contacts, etc.
Restoring a backup to an iOS device takes a few minutes, and when iTunes says that it’s done restoring the backup and your iPhone or iPad completely reboots, you can unlock it. From there, you’ll see the iOS Setup Assistant start screen. Swipe to the right to continue and go through the steps to set up your iPhone again. You’ll set up things like Location Services, Touch ID, Apple Pay, and iCloud.
Once you complete the setup process and reach the home screen, you’ll notice that you might have some apps that are darkened out with “Waiting…” underneath these app icons. This means that these apps are downloading to your device and are being installed, so sit back and relax while this happens, as it can take a while.
Once that’s done, though, your iPhone or iPad will be completely ready to use again and you’ll be free of the jailbreak.