This question already has an answer here:

I am trying to uninstall MySQL completely from Ubuntu 16.04 LTS,but I am facing an issue saying:

The following packages have unmet dependencies:
mariadb-client-10.0 : Depends: libdbd-mysql-perl (>= 1.2202) but it is not going to be installed
mariadb-client-core-10.0 : Depends: mariadb-common (>= 10.0.24-7) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

I tried also to uninstall Mariadb but I have always the same problem. Any idea !!

share|improve this question

marked as duplicate by terdon Jun 28 '17 at 12:04

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

As Tico pointed out, if you installed dbconfig-mysql uninstall that first

This worked for me

sudo apt-get remove dbconfig-mysql

after that I could continue with removing mysql-client and mysql-server

share|improve this answer

I finally uninstall MySQL completely, and reinstall it using these lines :

Remove all files related to MySQL

sudo apt-get purge mysql*

sudo apt-get autoremove

sudo apt-get autoclean

Then upgrade my distribution

sudo apt-get dist-upgrade

Then install MySQL

sudo apt-get install mysql-server

That's all.

share|improve this answer
4  
I had to remove dbconfig-mysql first. But, thanks! – Tico Oct 26 '16 at 23:24
2  
@Tico - That was what made whole difference. I tried every way to 'purge' and install old mysql-server but it didn't work. Once i did sudo apt-get purge dbconfig-mysql and did other removals and install, it worked. Thanks a lot! – Arvind K. Oct 29 '17 at 11:03
    
@ArvindK. I'm glad it also helped out – Tico Oct 29 '17 at 21:20

protected by Community Jan 25 '17 at 9:42

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.