如何从 ubuntu 13.04 中删除 openjdk 6?

如何从 ubuntu 13.04 中删除 openjdk 6?

当我做

sudo apt-cache search openjdk

我有:

default-jdk - Standard Java or Java compatible Development Kit
default-jdk-doc - Standard Java or Java compatible Development Kit (documentation)
default-jre - Standard Java or Java compatible Runtime
default-jre-headless - Standard Java or Java compatible Runtime (headless)
icedtea-7-jre-jamvm - Alternative JVM for OpenJDK, using JamVM
icedtea-7-plugin - web browser plugin based on OpenJDK and IcedTea to execute Java applets
openjdk-7-dbg - Java runtime based on OpenJDK (debugging symbols)
openjdk-7-demo - Java runtime based on OpenJDK (demos and examples)
openjdk-7-doc - OpenJDK Development Kit (JDK) documentation
openjdk-7-jdk - OpenJDK Development Kit (JDK)
openjdk-7-jre - OpenJDK Java runtime, using Hotspot JIT
openjdk-7-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headless)
openjdk-7-source - OpenJDK Development Kit (JDK) source files
java-package - Utility for creating Java Debian packages
freemind - Java Program for creating and viewing Mindmaps
icedtea-6-jre-cacao - Alternative JVM for OpenJDK, using Cacao
icedtea-6-jre-jamvm - Alternative JVM for OpenJDK, using JamVM
icedtea-6-plugin - web browser plugin based on OpenJDK and IcedTea to execute Java applets
jtreg - Regression Test Harness for the OpenJDK platform
jvm-7-avian-jre - lightweight virtual machine using the OpenJDK class library
libreoffice - office productivity suite (metapackage)
openjdk-6-dbg - Java runtime based on OpenJDK (debugging symbols)
openjdk-6-demo - Java runtime based on OpenJDK (demos and examples)
openjdk-6-doc - OpenJDK Development Kit (JDK) documentation
openjdk-6-jdk - OpenJDK Development Kit (JDK)
openjdk-6-jre - OpenJDK Java runtime, using Hotspot JIT
openjdk-6-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headless)
openjdk-6-jre-lib - OpenJDK Java runtime (architecture independent libraries)
openjdk-6-jre-zero - Alternative JVM for OpenJDK, using Zero/Shark
openjdk-6-source - OpenJDK Development Kit (JDK) source files
openjdk-7-jre-zero - Alternative JVM for OpenJDK, using Zero/Shark
uwsgi-app-integration-plugins - plugins for integration of uWSGI and application
uwsgi-plugin-jvm-openjdk-6 - Java plugin for uWSGI (OpenJDK 6)
uwsgi-plugin-jvm-openjdk-7 - Java plugin for uWSGI (OpenJDK 7)
uwsgi-plugin-jwsgi-openjdk-6 - JWSGI plugin for uWSGI (OpenJDK 6)
uwsgi-plugin-jwsgi-openjdk-7 - JWSGI plugin for uWSGI (OpenJDK 7)
openjdk-7-jre-lib - OpenJDK Java runtime (architecture independent libraries)

我尝试使用以下命令删除 jdk-6:

sudo apt-get remove openjdk-6-jdk

我得到的结果是:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'openjdk-6-jdk' is not installed, so not removed
The following package was automatically installed and is no longer required:
  libc6-i386
Use 'apt-get autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

我想卸载openjdk-6-jdk,但不应该删除openjdk-7-jdk,期待解决方案。

答案1

apt-cache对 APT 的包缓存执行各种操作,它不会列出已安装的包。

要查看某个openjdk软件包是否确实安装在你的系统上,你只需在终端中输入:

dpkg -l | grep openjdk

相关内容