我希望保持系统清洁,并记录下已安装的软件包,以便以后可以删除它们。但有时依赖关系仍然存在。
我安装了该libasound2-plugin-equal
包,它也拉进来了caps
。我删除了libasound2-plugin-equal
,但apt
没有删除caps
。
root@devuan:~# apt install libasound2-plugin-equal
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
caps
The following NEW packages will be installed:
caps libasound2-plugin-equal
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 230 kB of archives.
After this operation, 632 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://deb.devuan.org/merged daedalus/main amd64 caps amd64 0.9.26-1 [215 kB]
Get:2 http://deb.devuan.org/merged daedalus/main amd64 libasound2-plugin-equal amd64 0.6-8 [14.9 kB]
Fetched 230 kB in 1s (211 kB/s)
Selecting previously unselected package caps.
(Reading database ... 268554 files and directories currently installed.)
Preparing to unpack .../caps_0.9.26-1_amd64.deb ...
Unpacking caps (0.9.26-1) ...
Selecting previously unselected package libasound2-plugin-equal:amd64.
Preparing to unpack .../libasound2-plugin-equal_0.6-8_amd64.deb ...
Unpacking libasound2-plugin-equal:amd64 (0.6-8) ...
Setting up caps (0.9.26-1) ...
Setting up libasound2-plugin-equal:amd64 (0.6-8) ...
root@devuan:~#
root@devuan:~#
root@devuan:~# apt remove libasound2-plugin-equal
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
libasound2-plugin-equal
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 72.7 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 268570 files and directories currently installed.)
Removing libasound2-plugin-equal:amd64 (0.6-8) ...
root@devuan:~#
root@devuan:~#
root@devuan:~# apt autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@devuan:~#
autoremove
没有帮助。autoremove
既然该caps
包是作为依赖项安装的,为什么这里没有反应?
发生这种情况是因为您的系统上的某些其他软件包(弱)依赖于
caps
或ladspa-plugin
它提供的虚拟包。apt autoremove
仅删除绝对不依赖于任何内容的软件包;有关详细信息,请参阅推荐和建议如何与 apt-get dist-upgrade 和 apt-get autoremove 交互?如果你安装了
aptitude
,你可以使用它来找出保留的内容caps
:为了回答您的实际问题,最好的删除方法
caps
是手动删除:您可以配置
apt autoremove
忽略推荐和建议的软件包,但这会删除比您想要的多得多的软件包。另请参阅为什么不建议我删除这个包?