How to Uninstall Xampp Command Line Ubuntu?


XAMPP is a powerful tool for web development, but there may come a time when you need to uninstall it from your Ubuntu system. Whether you’re upgrading to a newer version or switching to a different development environment, this guide will walk you through the process of uninstalling XAMPP command line on Ubuntu. We’ll provide detailed instructions and expert insights to make the process smooth and hassle-free.

How to Uninstall XAMPP Command Line Ubuntu?

Uninstalling XAMPP from your Ubuntu system is a straightforward process, but it requires careful execution to ensure you don’t leave any remnants behind. Follow these steps to uninstall XAMPP command line on Ubuntu:

Open Terminal: Press Ctrl + Alt + T to open a terminal window. The terminal is where you’ll enter all the necessary commands to uninstall XAMPP.

Stop Apache and MySQL Servers: Before uninstalling XAMPP, make sure to stop the Apache and MySQL servers. Enter the following commands:

sudo /opt/lampp/lampp stopapache
sudo /opt/lampp/lampp stopmysql

This will ensure that these services are not running during the uninstallation process.

Remove XAMPP Directory: Now, it’s time to remove the XAMPP directory. Enter the following command:

sudo rm -rf /opt/lampp

This command will delete the XAMPP directory and all its contents.

Delete Symbolic Links: XAMPP creates symbolic links for easy access. Remove them using the following commands:

sudo rm /usr/bin/mysql
sudo rm /usr/bin/mysql_config
sudo rm /usr/bin/mytop

Remove Desktop Shortcut: If you have a desktop shortcut for XAMPP, you can remove it with:

rm ~/Desktop/xampp.desktop

Clean Up MySQL Data: If you want to remove MySQL data and databases, you can do so with:

sudo rm -rf /opt/lampp/var/mysql

Uninstall XAMPP: Finally, you can uninstall XAMPP using the uninstall script:

sudo /opt/lampp/uninstall

Restart Your System: To ensure that all changes take effect, it’s a good idea to restart your Ubuntu system:

sudo reboot

Frequently Asked Questions

Will uninstalling XAMPP delete my project files?

No, uninstalling XAMPP will not delete your project files. It only removes the XAMPP application and its components.

Can I reinstall XAMPP after uninstalling it?

Yes, you can reinstall XAMPP at any time if you need it again for your development work.

Are there any alternative web development environments for Ubuntu?

Yes, there are alternatives like LAMP (Linux, Apache, MySQL, PHP/Perl/Python) stack or Docker for containerized development environments.

What if I encounter errors during the uninstallation process?

If you encounter any errors, make sure you followed the steps correctly and that XAMPP and its components are not running.

Will uninstalling XAMPP affect my system’s other software?

Uninstalling XAMPP should not affect other software on your Ubuntu system. It only removes XAMPP-related files.

Can I use these instructions for other Linux distributions?

These instructions are specific to Ubuntu. For other distributions, the process may vary.

How to uninstall XAMPP command line Ubuntu?

You can uninstall XAMPP on Ubuntu using the following command: “sudo /opt/lampp/uninstall”.

How to remove XAMPP in Linux Mint?

To remove XAMPP in Linux Mint, you can use the command: “sudo /opt/lampp/uninstall”.


Uninstalling XAMPP command line on Ubuntu is a straightforward process when you follow the steps outlined in this guide. By stopping XAMPP services, removing its directory, and cleaning up symbolic links, you can ensure a clean uninstallation. Remember that your project files and data will remain intact. If you ever need to reinstall XAMPP or explore alternative development environments, you’re now equipped with the knowledge to do so.

Leave a comment