Java micro version cruft

Hi, I just came across a load near identical openjdk stuff. I’m guessing that most of this is cruft which for some reason is not getting cleared out as updates come thought.

I just wanted to check that I can remove the older micro versions and that they are not retained for a reason. Also any idea what I’m missing that this is piling up anyway?

ls /usr/lib/jvm/
java						 java-1.8.0-openjdk-1.8.0.191.b12-8.fc28.x86_64
java-13-openjdk-13.0.0.33-1.rolling.fc29.x86_64  java-1.8.0-openjdk-1.8.0.191.b12-8.fc29.x86_64
java-1.8.0					 java-1.8.0-openjdk-1.8.0.201.b09-2.fc29.x86_64
java-1.8.0-openjdk				 java-1.8.0-openjdk-1.8.0.201.b09-6.fc29.x86_64
java-1.8.0-openjdk-1.8.0.121-10.b14.fc25.x86_64  java-1.8.0-openjdk-1.8.0.212.b04-0.fc29.x86_64
java-1.8.0-openjdk-1.8.0.131-1.b12.fc25.x86_64	 java-1.8.0-openjdk-1.8.0.222.b10-0.fc29.x86_64
java-1.8.0-openjdk-1.8.0.151-1.b12.fc26.x86_64	 java-1.8.0-openjdk-1.8.0.72-7.b15.fc23.x86_64
java-1.8.0-openjdk-1.8.0.161-0.b14.fc26.x86_64	 java-1.8.0-openjdk-1.8.0.72-9.b16.fc23.x86_64
java-1.8.0-openjdk-1.8.0.161-5.b14.fc26.x86_64	 java-1.8.0-openjdk-1.8.0.77-1.b03.fc23.x86_64
java-1.8.0-openjdk-1.8.0.162-3.b12.fc26.x86_64	 java-openjdk
java-1.8.0-openjdk-1.8.0.171-3.b10.fc26.x86_64	 jre
java-1.8.0-openjdk-1.8.0.171-4.b10.fc27.x86_64	 jre-13
java-1.8.0-openjdk-1.8.0.171-4.b10.fc28.x86_64	 jre-13-openjdk
java-1.8.0-openjdk-1.8.0.181-7.b13.fc28.x86_64	 jre-13-openjdk-13.0.0.33-1.rolling.fc29.x86_64
java-1.8.0-openjdk-1.8.0.181.b15-0.fc28.x86_64	 jre-1.8.0
java-1.8.0-openjdk-1.8.0.181.b15-5.fc28.x86_64	 jre-1.8.0-openjdk
java-1.8.0-openjdk-1.8.0.181.b15-6.fc28.x86_64	 jre-1.8.0-openjdk-1.8.0.222.b10-0.fc29.x86_64
java-1.8.0-openjdk-1.8.0.191.b12-11.fc29.x86_64  jre-openjdk

Thanks for any advice.

1 Like
find /usr/lib/jvm -exec rpm -q -f {} \+ | grep -e "not owned" | sort

Typically, you may safely remove those files, however it is not an axiom since there are exceptions, and directories require recursive check.

1 Like

many thanks , that’s great help. I removed all the ones which were obviously from earlier versions of Fedora. That line pulls up a bunch which all seem to be symlinks, probably created by the installation scripts , so I’m not going to kill them. A couple show up as broken symlinks.

find /usr/lib/jvm -exec rpm -q -f {} \+ | grep -e "not owned" | sort
file /usr/lib/jvm/java-1.8.0 is not owned by any package
file /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.fc29.x86_64 is not owned by any package
file /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.fc29.x86_64/jre is not owned by any package
file /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.fc29.x86_64/jre/lib/ext is not owned by any package
file /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.fc29.x86_64/jre/lib/ext/java-atk-wrapper.jar is not owned by any package
file /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.fc29.x86_64/jre/lib/ext/jfxrt.jar is not owned by any package
file /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.fc29.x86_64/jre/lib is not owned by any package
file /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.fc29.x86_64/jre/lib/ext/java-atk-wrapper.jar is not owned by any package
file /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.fc29.x86_64/jre/lib/ext/jfxrt.jar is not owned by any package
file /usr/lib/jvm/java-1.8.0-openjdk is not owned by any package
file /usr/lib/jvm/java is not owned by any package
file /usr/lib/jvm/java-openjdk is not owned by any package
file /usr/lib/jvm/jre-13 is not owned by any package
file /usr/lib/jvm/jre-13-openjdk is not owned by any package
file /usr/lib/jvm/jre-1.8.0 is not owned by any package
file /usr/lib/jvm/jre-1.8.0-openjdk is not owned by any package
file /usr/lib/jvm/jre is not owned by any package
file /usr/lib/jvm/jre-openjdk is not owned by any package

file /usr/lib/jvm/java-1.8.0
/usr/lib/jvm/java-1.8.0: symbolic link to /etc/alternatives/java_sdk_1.8.0
file /etc/alternatives/java_sdk_1.8.0
/etc/alternatives/java_sdk_1.8.0: symbolic link to /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b10-0.fc29.x86_64

That’s cleaned it up enough. Thanks,

Do you have any idea why this is not getting cleaned out automatically? It seem like this has been building up for 5 or 6 years!

1 Like

This might be left intentionally to provide backward compatibility in case of buggy updates.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.