So if users want to remove the currently installed one MySQL from the Ubuntu system, you can follow this guide.
How to Remove MySQL on Ubuntu
The Ubuntu users can remove MySQL from the system by the following commands:
Method 1: Remove MySQL on Ubuntu using apt remove command
The apt remove command is the simplest and most widely used removal command MySQL from the Ubuntu system. This command removes the package from the “suitable” repository. Since, in my case, I installed MySQL Server and client on an Ubuntu system, so the command to remove them MySQL Packages from the system below:
The above command only removes the packages associated with MySQL on the Ubuntu system.
Method 2: Remove MySQL on Ubuntu using purge command
The Ubuntu users can also use the clean command with the MySQL Packages to remove them from the system. The command works similar to the “remove appropriate” Command.
Method 3: Remove MySQL on Ubuntu using autoremove command
If you use the remove automatically command with the MySQL Packages removed removes all packages, configuration settings and associated directories from the Ubuntu system. This command is useful because it frees up more memory compared to the above command.
Method 4: Remove MySQL on Ubuntu using purge autoremove command
The Ubuntu users can also use clean command along with remove automatically Command to completely remove the packages, source directories, configuration settings from MySQL from the system.
Diploma
Removed MySQL from the Ubuntu system can be easily done through four different commands. The “remove appropriate” And “clean” Commands work similarly and remove the MySQL packages from the system. However, the “automatic removal” And “clean up – autoremove” commands remove the MySQL Packages, configuration settings and source directories from the system, allowing users to free up more disk space.