After using a jailbroken iPhone for a while, some apps might stop working, you may need to take the device to Apple for a repair, or you may simply get sick of the jailbreak. In any case, you'll need to unjailbreak your iPhone.

It might surprise you to learn there are actually a couple of ways to go about doing this. Here's how to remove your jailbreak and restore stock iOS to your iPhone.

Before You Restore

Your reasons for restoring will vary, but one reason people often choose to get rid of their jailbreak is to install the latest version of iOS, which can't be jailbroken right away.

You may want to try updating your jailbroken iPhone on the off chance it works this time. You can do that by going to Settings > General > Software Update. But be warned, there are potential issues when doing so.

iPhone software update screen in Settings

For most, this option simply won't work. And others have reported experiencing battery life problems and activation issues when updating on top of a jailbreak.

Most iOS software updates also modify your hardware's baseband version, which means that if you're dependent on your jailbreak for a network unlock, you will lose your unlocked status when you do update iOS.

One way of potentially restoring your network unlock is to save your SHSH blobs, which is what Apple uses to authenticate your iPhone.

Unless you're making a warranty claim or passing the phone on to someone who can use it on the network it's locked to, you might as well keep an eye on the jailbreak scene to ensure you can still use your phone once you've updated and re-jailbroken.

Restoring the Right Way

Unless you want a headache, battery problems, or an iPhone that won't even turn on, don't simply attempt to update over-the-air. Use one of the following methods to restore your iPhone and unjailbreak it instead.

Use the Unc0ver App

Removing a jailbreak from your iPhone straight from the device is the easiest way to get your iPhone back to normal. You won't lose any of your data either!

Here's what to do:

  1. Open Unc0ver on your iPhone.
  2. Tap on the Settings icon in the top corner to open the app settings.
  3. Make sure that only the Refresh Icon Cache and Restore RootFS options are toggled on.
  4. Tap Done to save the settings you just changed.
  5. On the main screen, tap the Restore RootFS button which will now appear in place of the Jailbreak or Rejailbreak option.
  6. Once the Unc0ver app has completed this process, your iPhone will reboot and Cydia will have been removed.
  7. Delete Unc0ver from your device.
RootFS button in the Unc0ver app

If you're seeing an error message appear when you tap on the Restore RootFS button, try rebooting your iPhone and attempting the process again while your device is in Airplane Mode.

Use a Mac

It's really easy to remove a jailbreak from your iPhone using a Mac. You just need to restore the device to its factory settings or to a previous backup. Apple also details how to do this in its support pages.

Here's what to do:

  1. Plug your iPhone into your Mac.
  2. On the Mac, head to Finder and select your iPhone from the sidebar.
  3. Select General in the menu that appears.
  4. Click Restore iPhone, which you'll find near the bottom of the window.
  5. If you're trying to restore from a backup, click the Restore Backup option. You need to make sure you're using a backup from before you jailbroke your iPhone.
  6. Follow the onscreen instructions to complete the process.
The Restore iPhone screen on a Mac

Use DFU Mode

If you can't get your iPhone to show up in Finder when trying to restore, hope is not lost. You'll simply need to put the device into DFU mode before restoring. This is done by:

  1. Power off your device.
  2. For iPhones with a Home button: Press and hold the power button for three seconds, start pressing the Home button as well, but don't let go of the Power button, for 10 seconds. 
  3. For iPhones without a Home button: Quick-press the volume up button, then the volume down button. Press and hold the power button until the screen turns off, then quickly press the volume down and power button and hold it for five seconds. After five seconds, release the power button and keep holding down the volume button.
  4. Let go of the power button but keep holding the Home button for about 15 seconds.
  5. Your iPhone should appear in Finder now, and you can follow the instructions from step three above.

Back to Normal

You've now got stock iOS back on your device. This is perfect for those of you who no longer want the jailbreak or need their device serviced. All of your tweaks will be uninstalled, and your device will behave as if you never jailbroke it.

If you want your tweaks back, you'll need to re-jailbreak your iPhone, which is the same process as the first time you jailbroke the device.