
Fabian Tech Tips

MariaDB can be uninstalled by disabling the module or using the repository; both examples are in this guide.
Oct 13, 2024
1 min read
0
25
0
MariaDB can be uninstalled by disabling the module or using the repository; both examples are in this guide.
Uninstalling MariaDB 10.11 on Red Hat Modular
Stop the MariaDB Service:
Ensure MariaDB is not running:
sudo systemctl stop mariadb
Disable MariaDB from Starting on Boot:
Prevent MariaDB from starting automatically:
sudo systemctl disable mariadb
Remove MariaDB Packages:
Uninstall MariaDB server and client:
sudo dnf module reset mariadb
sudo dnf module disable mariadb
sudo dnf remove mariadb-server mariadb-client
Remove MariaDB Repository:
Delete the repository file:
sudo rm /etc/yum.repos.d/MariaDB.repo
Remove MariaDB Data Directory:
Delete the data directory if you no longer need the data:
sudo rm -rf /var/lib/mysql
Clean Up Unused Dependencies:
Remove any dependencies that are no longer needed:
sudo dnf autoremove
This process ensures that MariaDB 10.11 is entirely uninstalled from your Red Hat system.
##############################################################
or method two
Uninstalling MariaDB 10.11 on Red Hat
Stop the MariaDB Service:
Ensure MariaDB is not running:
sudo systemctl stop mariadb
Disable MariaDB from Starting on Boot:
Prevent MariaDB from starting automatically:
sudo systemctl disable mariadb
Remove MariaDB Packages:
Uninstall MariaDB server and client:
sudo dnf remove MariaDB-server MariaDB-client
Remove MariaDB Repository:
Delete the repository file:
sudo rm /etc/yum.repos.d/MariaDB.repo
Remove MariaDB Data Directory:
Delete the data directory if you no longer need the data:
sudo rm -rf /var/lib/mysql
Clean Up Unused Dependencies:
Remove any dependencies that are no longer needed:
sudo dnf autoremove
This process ensures that MariaDB 10.11 is entirely uninstalled from your Red Hat system.