Uninstall/Remove tomcat 9 completely from CentOS

Mukund S picture Mukund S · Sep 27, 2017 · Viewed 17.1k times · Source

I am trying to remove tomcat 9 from CentOS completely.

First I used

rpm -qa|grep tomcat

The output I got was

tomcat-9.0.0-26.el7.centos.x86_64

Then I used

sudo yum remove tomcat.x86_64

When I again tried

rpm -qa|grep tomcat

I didnt get any output. And I am not sure if the tomcat is removed completely or not. When I used the following command,

sudo yum list|grep -i tomcat

I can see a list which is

jglobus-ssl-proxies-tomcat.noarch       2.1.0-6.el7                    epel     
tomcat.noarch                           7.0.76-2.el7                   base     
tomcat-admin-webapps.noarch             7.0.76-2.el7                   base     
tomcat-docs-webapp.noarch               7.0.76-2.el7                   base     
tomcat-el-2.2-api.noarch                7.0.76-2.el7                   base     
tomcat-javadoc.noarch                   7.0.76-2.el7                   base     
tomcat-jsp-2.2-api.noarch               7.0.76-2.el7                   base     
tomcat-jsvc.noarch                      7.0.76-2.el7                   base     
tomcat-lib.noarch                       7.0.76-2.el7                   base     
tomcat-native.x86_64                    1.1.34-1.el7                   epel     
tomcat-servlet-3.0-api.noarch           7.0.76-2.el7                   base     
tomcat-webapps.noarch                   7.0.76-2.el7                   base     
tomcatjss.noarch                        7.2.1-6.el7                    base 

So my question is now I am not sure if tomcat is completely removed or not? If it is not, what else should I do to completely remove it from my system?

Answer

Aaron D. Marasco picture Aaron D. Marasco · Sep 27, 2017

It's probably gone. yum list is showing you all installed and available in various repos (in your output, base and epel). yum list installed or rpm -qa will show you only the ones currently installed. (And, for completeness, yum list available is the other option.)