如何从Ubuntu 14.04完全删除tomcat 7 [英] how to completely remove tomcat 7 from ubuntu 14.04

查看:418
本文介绍了如何从Ubuntu 14.04完全删除tomcat 7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网上搜索了有关如何在Ubuntu 14.04上完全删除tomcat7的信息,完全100%没有配置文件等……但是,没有一篇文章介绍如何逐步进行操作.

I search the web as to how remove tomcat7 on Ubuntu 14.04 completely 100% no config files etc ... leaving behind, but there is not one post to show how to step by step.

推荐答案

此处正在运行/经过测试的指令:

Here is working/tested instruction:

1)列出tomcat7的软件包

1) list the packages of tomcat7

dpkg --get-selections | grep tomcat7

您可能还希望列出像(dpkg --get-selections | grep tomcat)这样的tomcat软件包,以防万一.

You may want to list as well packages tomcat like (dpkg --get-selections | grep tomcat) just in case.

2)删除所有看到的软件包!仅当您删除单个程序包时->如果程序包A依赖于B,请注意其依赖性,您将需要同时删除B和A,并且先后顺序删除B和A-删除所有程序包的示例,如下所示:

2) remove all the packages you see! Only when you remove a single package -> pay attention at its dependencies if package A depend on B you will need to remove B and A together and in the order of B then A - An example of removing all packages as following:

root@dev:~# dpkg -P libtomcat7-java tomcat7 tomcat7-admin tomcat7-common tomcat7-docs tomcat7-examples

3)Ubuntu不会删除非空目录,例如配置文件.因此,您将必须手动将其删除.搜索留下的文件并将其删除.示例:

3) Ubuntu will not remove none-empty directories such as config files. So you will have to remove it manually. Search for the files left behind and remove them. Example:

find / -name "*tomcat7*"

然后将其删除例如:rm -r /etc/tomcat7 /var/cache/apt/archives/tomcat7* /var/cache/apt/archives/libtomcat7* /tmp/hsperfdata_tomcat7

完成!现在全部清除了.

Done! All is cleaned out now.

这篇关于如何从Ubuntu 14.04完全删除tomcat 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆