• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to remove MySQL package completely on Ubuntu 16.04

1396

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

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.

Related Tutorials in How to remove MySQL package completely on Ubuntu 16.04

Related Tutorials in How to remove MySQL package completely on Ubuntu 16.04

How to install Meld tool in Ubuntu
How to install Meld tool in Ubuntu
Feb 25, 2017
How to install Dconf-Editor on Ubuntu 18.04
How to install Dconf-Editor on Ubuntu 18.04
Jul 14, 2018
How to install and update OpenSSL on Ubuntu 16.04
How to install and update OpenSSL on Ubuntu 16.04
Mar 9, 2017
How to install GLib 2.0 on Ubuntu 17.04
How to install GLib 2.0 on Ubuntu 17.04
May 22, 2017
How to Install Android Emulator on Ubuntu 20.4.1
How to Install Android Emulator on Ubuntu 20.4.1
Jul 13, 2021
How To Install AnyDesk on Ubuntu 16.04
How To Install AnyDesk on Ubuntu 16.04
Apr 4, 2018
How to install Genymotion 2.12.1 on Ubuntu 18.04
How to install Genymotion 2.12.1 on Ubuntu 18.04
Jul 9, 2018
How to install Timeshift 18.4 on Ubuntu 18.04
How to install Timeshift 18.4 on Ubuntu 18.04
Jul 6, 2018

Related Forums in How to remove MySQL package completely on Ubuntu 16.04

Related Forums in How to remove MySQL package completely on Ubuntu 16.04

Ubuntu
matthew class=
Failed to enable unit: Refusing to operate on linked unit file sshd.service
Apr 15, 2019
Ubuntu
mason class=
Passwd: You may not view or modify password information for root On Ubuntu 19.04
May 27, 2019
Ubuntu
isaac class=
/etc/apt/sources.list Permission denied
May 18, 2017
MySQL
rolando class=
Mysqldump: Couldn't execute 'SHOW VARIABLES LIKE 'gtid\_mode'': Table 'performance_schema.session_variables' doesn't exist (1146)
May 9, 2019
MySQL
isaiah class=
ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists
Feb 8, 2017
Ubuntu
yousuf class=
lsb_release command not working : Debian
Jan 18, 2018
ifconfig command
jackbrookes class=
what is the location of the ifconfig program on your machine?
Jan 4, 2018
Ubuntu
mason class=
"E: Package 'php-mcrypt' has no installation candidate" error on Ubuntu 20.4.1
Mar 15, 2021

Related News in How to remove MySQL package completely on Ubuntu 16.04

Related News in How to remove MySQL package completely on Ubuntu 16.04

How To Install Mixxx on Ubuntu 16.04
How To Install Mixxx on Ubuntu 16.04
Oct 11, 2017
Ubuntu 17.04 released with greater expectations
Ubuntu 17.04 released with greater expectations
Apr 15, 2017
Ubuntu Core now available on i.MX6 based TS-4900 thanks to Technologic Systems Inc.
Ubuntu Core now available on i.MX6 based TS-4900 thanks to Technologic Systems Inc.
Mar 1, 2017
Ubuntu 17.10 Artful Aardvark Beta 1 is now here. Download Now
Ubuntu 17.10 Artful Aardvark Beta 1 is now here. Download Now
Sep 2, 2017
Ubuntu Unity is no more: One Linux dream has been axed
Ubuntu Unity is no more: One Linux dream has been axed
Apr 7, 2017
What’s next for Ubuntu Linux Desktop?
What’s next for Ubuntu Linux Desktop?
Apr 11, 2017
SQL sequel - worm rear its head after a decade
SQL sequel - worm rear its head after a decade
Feb 8, 2017
Say Hi to Ubuntu's new mascot
Say Hi to Ubuntu's new mascot
Mar 22, 2019
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 Elijah ?
Remote Desktop Connection Has Stopped Working

When accessing my remote machine server using remote desktop on a windows machine I am getting this error

forum (1)

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.