0

I have two identical directories in /usr/lib/jvm on my Debian machine.

  • /usr/lib/jvm/java-1.8.0-openjdk-i386
  • /usr/lib/jvm/java-8-openjdk-i386

And I want to get rid of what is not needed.

$ dpkg -S /usr/lib/jvm/java-8-openjdk-i386/bin/javac
openjdk-8-jdk-headless:i386

$ dpkg -S /usr/lib/jvm/java-1.8.0-openjdk-i386/bin/javac
dpkg-query: no path found matching pattern /usr/lib/jvm/java-1.8.0-openjdk-i386/bin/javac

$ dpkg -l | grep openjdk
openjdk-8-jdk
openjdk-8-jdk-headless
openjdk-8-jre
openjdk-8-jre-headless
0

1 Answer 1

4

If you run

ls -l /usr/lib/jvm

you’ll see that java-1.8.0-openjdk-i386 is a symlink to java-8-openjdk-i386, so there’s nothing to get rid of.

In such cases dpkg -S only finds the symlinks, it doesn’t dereference them:

dpkg -S /usr/lib/jvm/java-*-openjdk-i386

should indicate that both “directories” come from openjdk-8-jdk-headless.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .