![apt-get remove 不会删除](https://linux22.com/image/1103030/apt-get%20remove%20%E4%B8%8D%E4%BC%9A%E5%88%A0%E9%99%A4.png)
我安装并删除一个包后,该应用程序仍然存在:
$ sudo apt-get install dhcp3-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'isc-dhcp-server' instead of 'dhcp3-server'
The following packages were automatically installed and are no longer required:
libindicate-gtk3 libindicate5 python-gst0.10 python-indicate
python-twisted-words
Use 'apt-get autoremove' to remove them.
Suggested packages:
isc-dhcp-server-ldap
The following NEW packages will be installed:
isc-dhcp-server
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 762 kB of archives.
After this operation, 2,138 kB of additional disk space will be used.
Get:1 http://se.archive.ubuntu.com/ubuntu/ trusty/main isc-dhcp-server amd64 4.2.4-7ubuntu12 [762 kB]
Fetched 762 kB in 0s (3,544 kB/s)
Preconfiguring packages ...
Selecting previously unselected package isc-dhcp-server.
(Reading database ... 437078 files and directories currently installed.)
Preparing to unpack .../isc-dhcp-server_4.2.4-7ubuntu12_amd64.deb ...
Unpacking isc-dhcp-server (4.2.4-7ubuntu12) ...
Processing triggers for man-db (2.6.7.1-1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up isc-dhcp-server (4.2.4-7ubuntu12) ...
Generating /etc/default/isc-dhcp-server...
isc-dhcp-server start/running, process 18678
isc-dhcp-server6 stop/pre-start, process 18732
Processing triggers for ureadahead (0.100.0-16) ...
$ sudo apt-get remove dhcp3-server
[sudo] password for gauthier:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'isc-dhcp-server' instead of 'dhcp3-server'
The following packages were automatically installed and are no longer required:
libindicate-gtk3 libindicate5 python-gst0.10 python-indicate
python-twisted-words
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
$ dhcpd
Internet Systems Consortium DHCP Server 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
unable to create icmp socket: Operation not permitted
Can't open /var/lib/dhcp/dhcpd.leases for append.
为何dhcpd
留下?
我怎样才能真正将其去除?
(清除也无法删除该应用程序(当然,但至少我尝试过)。该应用程序之前没有安装过。)
答案1
如果你看一下输出命令,你会发现你安装了isc-dhcp-server
而不是dhcp3-server
。所以你要做的就是
sudo apt-get remove isc-dhcp-server
答案2
使用命令
sudo apt purge isc-dhcp-server