• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to remove MySQL package completely on Ubuntu 16.04

{{postValue.id}}

How to remove Mysql package completely on Ubuntu 16.04

MySQL is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases. This tutorial will explain on how to remove mysql packages completely on Ubuntu 16.04.

Installation procedure

To start the installation procedure, first check the version of mysql by logging mysql.

root@linuxhelp1:~# mysql &ndash u root &ndash p
Welcome to the MySQL monitor.  Commands end with   or g.
Your MySQL connection id is 7
Server version: 5.7.17-0ubuntu0.16.04.2 (Ubuntu)
Type ' help '  or ' h'  for help. Type ' c'  to clear the current input statement.
mysql>  q

To remove the MySQL packages fully from the target system execute the following command.

root@linuxhelp1:~# apt-get remove --purge mysql-server mysql-common
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libaio1 libevent-core-2.0-5 mysql-client-core-5.7 mysql-server-core-5.7
.
.
.
Purging configuration files for mysql-common (5.7.17-0ubuntu0.16.04.2) ...
dpkg: warning: while removing mysql-common, directory ' /etc/mysql'  not empty so not removed
Processing triggers for man-db (2.7.5-1) ...

Now remove the configuration directory and data directory by running the remove command.

root@linuxhelp1:~#  rm -rf /etc/mysql /var/lib/mysql

Clean up unused dependencies using autoremove command.

root@linuxhelp1:~# apt-get autoremove
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following packages will be REMOVED:
  libaio1 libevent-core-2.0-5 mysql-client-core-5.7 mysql-server-core-5.7
0 upgraded, 0 newly installed, 4 to remove and 469 not upgraded.
.
.
.
Removing libevent-core-2.0-5:amd64 (2.0.21-stable-2ubuntu0.16.04.1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...

To clear all local repository in the target system use autoclean command.

root@linuxhelp1:~# apt-get autoclean
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Del thunderbird-locale-es 1:45.5.1+build1-0ubuntu0.16.04.1 [728 kB]
Del thunderbird-locale-fr 1:45.5.1+build1-0ubuntu0.16.04.1 [427 kB]
.
.
.
Del thunderbird-locale-en-us 1:45.5.1+build1-0ubuntu0.16.04.1 [9,510 B]
Del libreoffice-pdfimport 1:5.1.4-0ubuntu1 [182 kB]
Del libreoffice-gnome 1:5.1.4-0ubuntu1 [60.5 kB]

Now remove all mysql related configuration files using purge command as follows.

root@linuxhelp1:~# apt-get purge mysql*
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Note, selecting ' mysqltcl'  for glob ' mysql*' 
.
.
.
Package ' mysql-testsuite'  is not installed, so not removed
Package ' mysql-testsuite-5.7'  is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 469 not upgraded.

Wasn' t that an easy configuration procedure? This procedure will ensure the complete removal of MySQL from the target system.

Tags:
landon
Author: 

Comments ( 3 )

parthiban
Thanks for your Feedback and keep in touch for further tutorials
jiweili
Thank you for your blog,this is help me a lot.
prakashvaghela
Good Step by step Explaination :)
Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

how can I check it is permanently removed or not ?

A

check the package still available using dpkg -l | grep mysql if yes, remove completely using dpkg --purge & check

Q

Is MySQL the same as SQL Server?

A

While developing software applications, programmers use relational database management system (RDBMS) to create, read, update and delete back-end data. ... Both MySQL and MS SQL Server are widely used enterprise database systems. MySQL is an open source RDBMS, whereas SQL Server is a Microsoft product.

Q

What is the MySQL service?

A

MySQL server is a SQL compliant server, in other words, it is a relational model database server. It is very popular because it is free. It was developed by Sun and moved to Oracle when Oracle acquired Sun. Oracle continued improving it. The latest version is 5.7.

Q

Is MySQL is a programming language?

A

SQL stands for Structured Query Language, and it is a programming language designed for querying data from a database. MySQL is a relational database management system, which is a completely different thing.

Q

What are the features of a SQL?

A

SQL Developer supports the following core features when migrating from Microsoft SQL Server: ... Parses and transforms T-SQL stored procedures, functions, triggers, and views to Oracle PL/SQL. Provides advanced customization capabilities such as the ability to change data type mappings, delete and rename objects.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help David Lopez Guillen ?
Ayuda urgente instale SSL para servidor Opensuse y ahora no funciona tengo servicio web

hola segui este tutorial para tener un certificado ssl y ahora no se ve mi app en la red, espero alguien pueda ayudarme, tengo M9oodle en3.5 en un servidor open suse y ahora no funciona por favor ayuda.

https://www.linuxhelp.com/how-to-create-ssl-certificate-in-opensuse

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.