dpkg --list | grep [0-9]\-jre-headless
表明,
rc openjdk-7-jre-headless:amd64 7u79-2.5.6-0ubuntu1.14.04.1 amd64 OpenJDK Java runtime, using Hotspot JIT (headless)
rc openjdk-7-jre-headless:i386 7u79-2.5.5-0ubuntu0.14.10.2 i386 OpenJDK Java runtime, using Hotspot JIT (headless)
rc openjdk-8-jre-headless:amd64 8u40~b09-1 amd64 OpenJDK Java runtime, using Hotspot JIT (headless)
ii openjdk-8-jre-headless:i386 8u40~b09-1 i386 OpenJDK Java runtime, using Hotspot JIT (headless)
这清楚地表明,openjdk-7-jre-headless:i386
安装在我的 ubuntu 14.04 机器上。
然而,当我跑步时,apt-get remove openjdk-7-jre-headless:i386
它说,
Building dependency tree
Reading state information... Done
Package 'openjdk-7-jre-headless:i386' is not installed, so not removed
为什么同一个包的dpkg --list
和, 显示矛盾的消息?apt-get remove
答案1
dpkg
显示正确的信息,rc
其输出含义中的标志openjdk-7-jre-headless:i386
已被删除,但其配置文件并未被删除。
dpkg -l
实际上是前端dpkg-query -l
。你可以阅读dpkg-查询手册更多细节。