看起来,一个简单的apt-get remove apache2
并没有完全删除apache2
,因为在运行top
时,我仍然可以在其中一个进程上看到它。如何在他的ubuntu服务器上完全删除apache2
?
它并没有被移除:
~# which apache2
/usr/sbin/apache2
~# whereis apache2
apache2: /usr/sbin/apache2 /etc/apache2 /usr/lib/apache2 /usr/share/apache2 /usr/share/man/man8/apache2.8.gz
但当我再次做apt-get remove apache2
时:
# apt-get remove apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package apache2 is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
发布于 2012-08-17 10:00:26
apache2
是一个只选择其他包的元包。如果通过安装该包来安装apache,则只需运行此程序就可以清除自动选择的包:
sudo apt autoremove
如果这不起作用,您可能已经手动安装了其中一个依赖程序。您可以从太空中锁定所有apache2-
包并对其进行核弹:
sudo apt remove apache2.*
为了将来参考,要找出二进制程序包是哪个包,您可以运行以下命令:
dpkg -S `which apache2`
我希望(在撰写本报告时) apache2.2-bin
能回来。
发布于 2013-12-08 08:03:48
按照以下步骤使用apache2
删除Terminal
服务:
sudo service apache2 stop
一起运行,则首先停止它sudo apt-get autoremove
,以防需要进行任何其他清理。您可以执行以下两项测试以确认apache已被删除:
which apache2
-应该返回一个空行sudo service apache2 start
-应该返回apache2: unrecognized service
发布于 2012-08-17 10:03:40
首先检查您是否使用正确的包名,IMO正确的包名是:apache2.x-common
如果要完全删除包(包括配置文件),请尝试:
dpkg --purge apache2.2-common
https://askubuntu.com/questions/176964
复制相似问题