NAME
dpkg - package manager for Debian
-P, --purge package...|-a|--pending Purge an installed or already removed package. This removes
everything, including conffiles. If -a or --pending is given
instead of a package name, then all packages unpacked or
removed, but marked to be purged in file /var/lib/dpkg/status,
are purged.
在玩LAMP的时候,update了一下apache2,版本到了2.4,conf没更新,还是用LockFile命令。
网上查了一下,LockFile是2.2的命令,2.4不支持。所以想卸载重装apache2。
一开始用apt-get remove apache2,发现conf没有删掉,就手动删除了。
然后发现apt-get install apache2后,conf不会自动生成!
后来百度了一下,发现删除conf是用dpkg -P 命令的。
所以先dpkg -P apache2,然后apt-get install apache2。
apach2才能重装好。apachectrl start也OK了。