Remove Tomcat from Linux | Uninstall Tomcat Ubuntu

Apache Tomcat or simply Tomcat (formerly it was also known as Jakarta Tomcat) is an open source web server and servlet container developed by the Apache Software Foundation (ASF). Tomcat can be installed on CentOS/Redhat machine either using yum or from the source file. However, in this article, we will see, how we can uninstall/remove tomcat from the Linux machine.

In order to remove tomcat from your machine, the first thing you need to check is how this package got installed on your server.

Removal of Tomcat installation through package manager

Suppose, you have installed tomcat5 using “yum” package manager, then the default tomcat configurations can be found at “/etc/tomcat5” and “/usr/share/tomcat5”. You can find the tomcat packages using the following command:

# rpm –qa | grep tomcat

Now, you can proceed with uninstallation of the listed packages using “yum” as follows:

Continue this for the other packages. Packages such as tomcat5-servelet may have many dependencies including open office. So, if you want to remove the packages without removing the dependencies, you need to use the command “rpm” as follows:

# rpm –e package_name –nodeps

After removing the packages, you need to remove the tomcat directories too:

# rm –rf /etc/tomcat5
# rm –rf /usr/share/tomcat5

Removal of Tomcat source file installation

In this case, you need to stop tomcat and remove all the binaries from the server.

Hand-picked related articles

The Ring is an open source tool which allows its users to communicate in multiple ways. It was developed with the main goal of protecting privacy and personal information. It is created and developed by a small team at Savoir-faire [...]

I see that people have different preferences when it comes to web browsers on Linux and they argue alot about 'The best browser on Ubuntu' topic, but we are not here to find out which web browser fits best in [...]

OpenShift Origin is the open source upstream project that powers OpenShift, Red Hat's container application platform. It provides support for Python, PHP, Perl, Node.js, Ruby, and Java and is extensible so that users can add support for other languages. The [...]