0

I removed mysql from Ubuntu server completely as below

sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
sudo deluser mysql
sudo rm -rf /var/lib/mysql
sudo apt-get purge mysql-server-core-5.5
sudo apt-get purge mysql-client-core-5.5

When I run dpkg-query -l there is no mysql package listed. However, when I do dpkg-query --show mysql-server it prints out mysql-server

It must return "There is no package mysql-server installed" but I'm not sure why it shows mysql-server is installed.

  • It should? It does query information about packages from the database, and even though you purged the package from your system, dpkg likely sees no reason to erase the database records as well. I suspect this works as designed. – Felix Frank Jun 19 '14 at 9:04
  • So how can I erase database records? – brsbilgic Jun 19 '14 at 19:10
  • Try pruning them from /var/lib/dpkg/available. – Felix Frank Jun 19 '14 at 21:46

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.