Jailbreaking your iPhone is exciting and maybe sometimes problematic at the same time. Interesting because it lets you explore a lot and install Cydia tweaks to customize the user experience, but it gets problematic when you face errors.
Well, it’s not as bad as it sounds since problems always come with their solutions. One of the issues I encountered while jailbreaking my iOS 10.2 was DPKG_LOCKED Cydia error, and I decided to restore my device to fix the problem.
To tell you the truth, I was stupid to do so and restoring isn’t really a solution for all the problems. I followed the below six-steps guide to get rid of the error, and it worked. Try it if you are facing the same issue.

First, you need to download Yalu Dark from DPKG fix. Click here to download.
Once downloaded, delete the existing Yalu102 app from your phone and then reboot it. This is how your phone gets in the non-jailbroken state.
Now, download Cydia Impactor and launch it to your computer by connecting your phone. Drag and drop the Yalu Dark IPA downloaded in the first step and follow the following instructions that emerge on the screen.
After following the incoming instructions, you can run the new jailbreak on your phone. Cydia will then be reinstalled to your newly jailbroken phone along with all the requirements.
You may feel like you’ve fixed the issue at step four, but you need to install Filza from Cydia to replace the particular Yalu version with a regular one. Launch the app and remove the following two files from / (root)
Finally, you need to jailbreak your phone with the normal Yalu version, so remove Yalu Dark with DPKG. So, this is it. Your jailbreak should work fine now. Let us know if it worked for you by commenting below.
Hello, I'm Imran Aftab, a tech enthusiast using Android, iOS, and Windows. Hardware expert for Gaming & Crypto mining rigs. I have been writing on tech since 2013, starting with ohguideme, then Androidcentral. I have written and published several guides and tutorials on how to root Android, flash custom ROM, recovery, and jailbreak iPhone, and have written several guides on how to bypass FRP. I also worked in a phone repair shop, so I have pretty good experience with mobile software and troubleshooting. So, all the guides you see here have been tested and confirmed to work.