An important Cydia issue that some of you might encounter while installing tweaks, especially if you happen to reset the device to factory settings, which will most likely kill your Jailbreak. This fix is addressed towards iOS 10.x Jailbreak (Yalu) and should fix "DPKG_LOCKED" in Cydia and installed components not being shown. DPKG_LOCKED error is a pretty serious issue. Most of the times it results in you being forced to restore as the Jailbreak is useless at that point.
We are not able to find any correct fix for that, a user has created his own fix, which consists in a modified version of Yalu Dark (Open source). It ignores previous installations of yalu102 or Yalu Dark and reinstalls everything (related to Jailbreak) by force. This will not affect your device, but tweaks you might have had installed will be removed as well.
Click here to download the Yalu Dark With DPKG Fix.
Make sure the SHASUM matches. You can also check the source code if curious or paranoid.
Remove yalu102 or Yalu Dark from your device and reboot in non-Jailbroken state.
Side-load the IPA of Yalu Dark With DPKG Fix using Cydia Impactor from (http://cydiaimpactor.com)
Run the Jailbreak.
Once Jailbroken, Cydia will be reinstalled, alongside with all its dependencies on the normal place (it won't care if you've had a stasher).
Install Filza and remove .installed_yaluX and .installed_Yalux_Fix from / (root).
Remove Yalu Dark With DPKG fix as this one will attempt fixing every time you jailbreak with it.
Side-load yalu102 or a normal Yalu Dark ipa or from Luca Todesco's website.
Done.