0

When I am trying to uninstall mysql its giving fallowing ERROR

$ apt-get remove --purge mysql*.*
 Reading package lists... Done
 Building dependency tree
        Reading state information... Done
 E: The package mysql-server-5.6 needs to be reinstalled, but I can't find an archive for it

How to reinstalled or uninstall mysql-server-5.6

Thanks

  • Which version of Ubuntu are you running? – fkraiem May 23 '16 at 8:04
  • 2
    To uninstall Mysql Server use sudo apt-get remove mysql-server – t9toqwerty May 23 '16 at 8:10
  • @ThorOdinson you can move this to an answer, to it can get accepted if it was helpful. – Videonauth May 23 '16 at 9:23
0

Remove MySql completely:

1.Stop the MySql Database Server

sudo service mysql stop

OR

sudo service mysqld stop

2.Kill all the MySql related processes

sudo killall -9 mysql
sudo killall -9 mysqld

3.Remove the MySql files and related dependencies

sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean

4. Delete Database User

sudo deluser mysql

5.At last , delete all MySql related directories

sudo rm -rf /var/log/mysql*
sudo rm -rf /var/lib/mysql*
sudo rm -rf /etc/mysql*

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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