Skip to content

apt failed to uninstall

sudo apt-get remove phpmyadmin

or simply purging the package:

sudo apt-get purge phpmyadmin

If neither of those work, you may want to run:

sudo apt-get -f install

… and then try running them again. The above will attempt to resolve any dependencies that may otherwise exist.

You can also run:

sudo apt autremove

… to remove the packages listed in the output since they are no longer in use/needed.

If nothing seems to be working, we can remove the dpkg files manually:

rm -r /var/lib/dpkg/info/phpmyadmin.*

… then run:

sudo apt-get clean \
&& sudo apt-get update \
&& sudo apt-get remove phpmyadmin \
&& sudo apt-get purge phpmyadmin