How to fix DPKG_LOCKED/cydo returned an error code after Electra1131

Even though a lot of users have finally managed to jailbreak their iPhones, Cydia has started throwing errors left and right. Here’s a quick fix for the DPKG_LOCKED Cydia and cydo returned an error code errors on iOS 11.

Why does Cydia throw the DPKG_LOCKED/cydo returned an error code error?

Cydia throws the DPKG_LOCKED and cydo returned an error code messages on a number of occasions, namely –

  • Cydia not installed properly on your iPhone or iPad.
  • Cydia installation getting corrupt.
  • Jailbreak uses a bogus or outdated version of the Cydia package manager.
  • User error.

DPKG_LOCKED Cydia error on iOS 11

Thankfully enough, the good old Delectra script still works for Electra1131 even though the developer didn’t update it.

You can easily use this script to clean your Cydia installation and then jailbreak your device again from scratch.

Requirements

  • iPhone, iPad, or iPod touch
  • iOS 11.2-11.3.1 firmware
  • Wifi connectivity
  • Delectra uninstall script
  • A computer running Windows or macOS
  • Wifi network

Fix DPKG_LOCKED and cydo returned an error code on iOS 11.2-11.3.1 with Delectra

Prepare your device

Step 1 First and foremost, ensure your device is in jailbreak mode. If it isn’t, re-jailbreak your device by following this guide.

Step 2 Download Cyberduck for macOS or Windows from here.

Step 3 Download the Delectra shell script (unjailbreak.sh) from this link.

Step 4 Open the Settings app on your Apple device, go to Wi-Fi and tap the “i” icon present alongside your Wifi network you are connected to. Note down the IP Address value as we will be using it in the subsequent steps.

In our case, the IP address is 192.168.1.100.

Transfer the uninstall script to your device

Step 5 Launch CyberDuck SSH utility and click on Open Connection.

We will demonstrate this process using macOS Mojave but you can perform all steps on Windows as well.

Step 6 Select SFTP (SSH File Transfer Protocol) from the protocol dropdown list. If you set it to any other option, you will not be able to establish an SFTP connection.

Step 7 Enter the following details to establish an SFTP session –

  • Server – Your Wifi network’s IP address you noted in step 4 above.
  • Username – root
  • Password – alpine (default password)
  • SSH Private Key – None (default)

Step 8 Cyberduck will now warn you about an “unknown fingerprint”. Click Allow to move on to the next step.

Step 9 Transfer the unjailbreak.sh shell script to the /private/var/root folder by dragging it onto Cyberduck’s window.

Remember, this is the default folder and contains only two sub-folders (Application Support and Library) and a file (files.list).

Execute Delectra script

Step 10 On your Mac, close Cyberduck and go to Go > Utilities. If you are on Windows, you must use PuTTY telnet client that you can download from this link.

Step 11 Open the Terminal app.

Step 12 You would now want to log in to your device as root. Enter the following commands –

ssh root@<IP Address noted in step 4>

Step 13 Terminal will now warn you about the authenticity of the host and will ask you to continue or abort the session. Type in yes to continue.

Step 14 Type alpine in the “password:” field and wait for it to log you in. Remember, you must use your custom password if you modified it before.

Step 15 Type the following command and hit enter/return key to execute it.

bash ./unjailbreak.sh

Jailbreak your device

Step 16 Once the script removes jailbreak from your device, it will go back to its original stock firmware version. Restart and jailbreak your iPhone/iPad using Electra1131.

That’s all there’s to it! You will now be able to install your favorite Cydia tweaks without DPKG_LOCKED and cydo returned an error code messages pestering you.

36 Comments

  1. Cristian Cuestas April 6, 2019
    • Gian April 7, 2019
  2. SteveW November 21, 2018
    • Gian December 6, 2018
  3. Cognac September 23, 2018
    • Gian September 23, 2018
  4. dan July 28, 2018
    • iOS Expert July 28, 2018
      • Ismael Gamboa August 10, 2018
        • Gian August 10, 2018
  5. Immortal July 22, 2018
    • iOS Expert July 22, 2018
  6. Bryan Munera July 14, 2018
    • iOS Expert July 15, 2018
  7. bryan July 14, 2018
  8. John Clark July 14, 2018
    • iOS Expert July 14, 2018
  9. Ryan Griffin July 13, 2018
  10. Dr.Noor July 12, 2018
    • iOS Expert July 12, 2018
  11. Harry July 11, 2018
    • iOS Expert July 11, 2018
  12. johnny6300 July 10, 2018
    • iOS Expert July 11, 2018
  13. Ridwane Djima July 10, 2018
    • iOS Expert July 11, 2018
  14. jazzy July 10, 2018
    • iOS Expert July 11, 2018
  15. paul July 10, 2018
    • iOS Expert July 11, 2018
  16. AndrewCR7 July 9, 2018
    • iOS Expert July 9, 2018
      • AndrewCR7 July 10, 2018
        • iOS Expert July 10, 2018
      • AndrewCR7 July 10, 2018
        • iOS Expert July 10, 2018

Leave a Reply

Share via
Copy link
Powered by Social Snap