Uninstalling mysql from ubuntu 12.04 + higher

10:37 AM , , 0 Comments

Using the steps below you can uninstall mysql from ubuntu,
Started with this
sudo apt-get remove --purge mysql-client mysql-server   

It gave errors- Error Displayed:

E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/)
Delete the lock file 
sudo rm /var/lib/apt/lists/lock and sudo rm /var/cache/apt/archives/lock for cache
sudo fuser -cuk /var/lib/dpkg/lock; sudo rm -f /var/lib/dpkg/lock
And the same command can be used for the apt cache lock:
sudo fuser -cuk /var/cache/apt/archives/lock; sudo rm -f /var/cache/apt/archives/lock

Bijendra Singh

Some say he’s half man half fish, others say he’s more of a seventy/thirty split. Either way he’s a fishy bastard.