Check out example codes for "remove mysql". It will help you in understanding the concepts better.

Code Example 1

sudo apt-get remove --purge mysql* -y
sudo apt-get autoremove -y
sudo apt-get autoclean

Code Example 2

sudo apt-get remove --purge mysql*

Learn ReactJs, React Native from akashmittal.com