如何卸载java6

如何卸载java6

我在尝试

root@vz10931:/var/www/mailer# apt-get remove --purge sun-java6-bin
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run apt-get -f install to correct these:
The following packages have unmet dependencies:
  sun-java6-jdk: Depends: sun-java6-bin (>= 6.24-1build0.8.04.1) but it is not going to be installed
  sun-java6-jre: Depends: java-common (>= 0.24) but it is not installable
                 Depends: sun-java6-bin (>= 6.24-1build0.8.04.1) but it is not going to be installed or
                          ia32-sun-java6-bin (>= 6.24-1build0.8.04.1) but it is not installable
  vim: Depends: vim-common (= 1:7.1-138+1ubuntu3.1) but 2:7.3.154+hg~74503f6ee649-2ubuntu3 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

以下是我的来源列表

deb http://pl.archive.ubuntu.com/ubuntu/ hardy main restricted universe multiverse
deb-src http://pl.archive.ubuntu.com/ubuntu/ hardy main restricted universe multiverse
deb http://pl.archive.ubuntu.com/ubuntu/ hardy-updates main restricted universe multiverse
deb-src http://pl.archive.ubuntu.com/ubuntu/ hardy-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu hardy-security main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu hardy-security main restricted universe multiverse

Ubuntu 版本 - Hardy Heron

有人知道如何删除 java 吗?

答案1

尝试

sudo apt-get --purge remove sun-java6-\* vim-common

这也会删除“vi”编辑器。你可以改用“nano”、“pico”,或者稍后尝试安装 vim

答案2

我不确定这是否适用于 Hardy。在 9.x+ 上可以。请尝试以下命令。它将从 sun-java6 中删除所有软件包:

sudo apt-get purge sun-java6-\*

相关内容