In this article, we will focus on uninstalling XAMPP from an Ubuntu system using the terminal. XAMPP is a popular software package that provides a local development environment for web developers. It includes Apache, MySQL, PHP, and Perl, making setting up a server environment on your local machine easy.
However, there might be instances where you no longer need XAMPP or wish to switch to a different development environment. Uninstalling XAMPP from your Ubuntu system allows you to clean up unnecessary files and regain valuable disk space.
In the following sections, we will provide a step-by-step guide on uninstalling XAMPP from Ubuntu using the terminal. We will cover the necessary commands and configurations to ensure a smooth removal.
So, let's proceed and learn how to uninstall XAMPP from your Ubuntu system to maintain a clean and efficient development environment and how to uninstall XAMPP in Ubuntu using a terminal, how to uninstall XAMPP in Ubuntu, how to remove XAMPP in Ubuntu, uninstall XAMPP ubuntu 22.04, ubuntu uninstall XAMPP.
There are multiple ways to uninstall XAMPP from the Linux Ubuntu system.
Open a terminal window and execute the following command. Now, let's proceed with uninstalling XAMPP. Run the following command in the terminal to remove the entire XAMPP directory.
sudo /opt/lampp/uninstall
If there is a problem with the first solution or does not uninstall XAMPP from Ubuntu. So, we can uninstall XAMPP by executing this command.
sudo -i cd /opt/lampp ./uninstall
Also, you can delete the lampp folder using the following command.
sudo rm -r /opt/lampp
Before uninstalling XAMPP, make sure to stop all the services running under XAMPP. Open a terminal window and execute the following command to stop Apache and MySQL services.
sudo /opt/lampp/lampp stop
By default, XAMPP is installed in the /opt/lampp
directory. You can verify the installation path by running the following command.
ls /opt/lampp
Now, let's proceed with uninstalling XAMPP. Run the following command in the terminal to remove the entire XAMPP directory.
sudo rm -r /opt/lampp
Next, remove any remaining XAMPP binaries and symlinks by running the following commands.
sudo rm /usr/bin/php
sudo rm /usr/bin/phpize
sudo rm /usr/bin/pear
XAMPP may have created some data and configuration files that we need to remove. Run the following commands to remove them.
sudo rm -r /var/lampp
sudo rm -r /etc/php
sudo rm -r /etc/apache2
If you installed MySQL through XAMPP and no longer need it, you can remove it using the following command.
sudo apt remove --purge mysql-server mysql-client
Finally, run the following command to clean up any unused packages and dependencies.
sudo apt autoremove
You might also like: