On APT-based systems

  1. Check whether there are any existing packages:
shell> dpkg -l | grep -i mysql
  1. Remove the packages using the following:
shell> sudo apt-get remove mysql-community-server mysql-client mysql-common mysql-community-client mysql-community-client-core mysql-community-server mysql-community-server-core -yReading package lists... DoneBuilding dependency tree       Reading state information... DoneThe following packages will be REMOVED:  mysql-client mysql-common mysql-community-client mysql-community-client-core mysql-community-server mysql-community-server-core mysql-server0 upgraded, 0 newly installed, 7 to remove and 341 not upgraded.After this operation, 357 MB disk space will be freed.(Reading database ... 134358 files and ...

Get MySQL 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.