title: Cannot uninstall mysql-server-8.0
body: <p>after installing mariadb with mysql already installed, i had issues and mysql wasent working so i tried to uninstall mysql and the package broke.
  after frustrating hours of trying to fix this i stupidly deleted all the mysql files.
  at the moment:</p>
  <p>ive tried <code>dpkg -l | grep mysql</code>, and get nothing</p>
  <p>so i tried <code>dpkg -l | grep mysql</code> and got,</p>
  <pre><code>mysql-client-8.0                install
  mysql-client-core-8.0           install
  mysql-common                    install
  mysql-server-8.0                install
  mysql-server-core-8.0           install
  php7.4-mysql                    install
  </code></pre>
  <p>after trying to remove mysql-server-8.0:</p>
  <pre><code>sudo dpkg --remove --force-remove-reinstreq mysql-server-8.0
  </code></pre>
  <p>i get:</p>
  <pre><code>(Reading database ... 219264 files and directories currently installed.)
  Removing mysql-server-8.0 (8.0.22-0ubuntu0.20.10.2) ...
  Failed to stop mysql.service: Unit mysql.service not loaded.
  invoke-rc.d: initscript mysql, action &quot;stop&quot; failed.
  dpkg: error processing package mysql-server-8.0 (--remove):
  installed mysql-server-8.0 package pre-removal script subprocess 
  returned error exit status 1
  Failed to stop mysql.service: Unit mysql.service not loaded.
  invoke-rc.d: initscript mysql, action &quot;stop&quot; failed.
  Failed to start mysql.service: Unit mysql.service not found.
  invoke-rc.d: initscript mysql, action &quot;start&quot; failed.
  Unit mysql.service could not be found.
  dpkg: error while cleaning up:
  installed mysql-server-8.0 package post-installation script subprocess 
  returned error exit status 1
  Errors were encountered while processing:
  mysql-server-8.0
  </code></pre>
  <p>Is there a way to fix this and completely wipe mysql and then install mariadb??
  If not i suppose the only way to fix this is to reinstall the os .
  thanks!!</p>