Why is the old /usr/lib/jvm/JAVA directory not removed during an update?

Solution In Progress - Updated -

Issue

  • When java is updated (yum update), the old JAVA directory is retained:
# cd /usr/lib/jvm
# ll
drwxr-xr-x 3 root root 16 Jul 31 01:44 java-11-openjdk-11.0.10.0.9-1.el7_9.x86_64
drwxr-xr-x 8 root root 90 Jul 31 01:42 java-11-openjdk-11.0.11.0.9-1.el7_9.x86_64

Yet on another box when java is updated, the old JAVA directory is removed:

# cd /usr/lib/jvm
# ll
drwxr-xr-x 8 root root 90 Jul 31 01:42 java-11-openjdk-11.0.11.0.9-1.el7_9.x86_64
  • Why is sometimes the old /usr/lib/jvm/JAVA directory removed when there is an update, and sometimes it is retained?

Environment

  • Red Hat Enterprise Linux (RHEL)
  • Red Hat build of OpenJDK
  • rpm install

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content