remove mysql from ubuntu 20.04 and reinstall without loosing data code example Example: uninstall mysql 8 ubuntu 20.04 sudo apt-get remove --purge mysql*