Unmet dependencies - cannot remove package libgbm1
The problem here is to lock down the trouble maker package and kick it out. Then you can fix inconsistent dependencies with sudo apt-get -f install
.
So with cautious you may use: sudo dpkg --force-all -P libgbm1
to force removing the broken. This command may damage your system, so you should watch it. And try to fix: sudo apt-get -f install
.
If any packages are corrupting as well, repeat above steps cautiously. And each time you removed broken packages, try to fix them. I tackled my problem in this case.
Instead of rushing to remove your broken packages using the --force-all
option of dpkg
, first try removing it without this option, using simply
dpkg -P package-name
In my case, dpkg
printed why it couldn't remove this package: another package depended on it. After I removed the dependee, the broken package could finally be removed, without any --force-anything
.
This may require several recursive removals in case when the dependee is also broken, but the end result should be fixing the dependency chain, which apt
was unable to fix, by removals.