How to safely remove java with lots of dependencies

Issues related to applications and software problems
Post Reply
phil.e
Posts: 34
Joined: 2018/02/13 20:28:14

How to safely remove java with lots of dependencies

Post by phil.e » 2018/04/25 14:48:36

Hello,

I've got some CentOS 6.9 workstations that have multiple versions of Java installed - 1.5, 1.6, and 1.7. I would like to remove 1.5 and 1.6, and leave just 1.7, but when I go to do a "yum erase" on the 1.5, yum lists 89 packages that are dependent on it - 1.6 and 1.7 only list their own associated java packages.
These workstations were originally built several years ago and I'm guessing 1.5 was the installed java version at the time, and those packages established their java dependencies based on 1.5. I suspect removing 1.5 is going to break all those apps that are using it.
How can I safely get rid of 1.5?
And if the only dependency 1.6 has is openjdk-devel, should that be an easy removal?

Thanks,
Phil.e

User avatar
TrevorH
Forum Moderator
Posts: 23635
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to safely remove java with lots of dependencies

Post by TrevorH » 2018/04/25 16:22:18

Are you sure you have the equivalent package set installed for 6, 7 or 8 that you have currently installed for 5?

Hmm, the only java-1.5.0 packages left that I see in the repos are for gcj and I'm fairly sure that's gone form newer openjdk versions.

Post the output of the yum remove.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

phil.e
Posts: 34
Joined: 2018/02/13 20:28:14

Re: How to safely remove java with lots of dependencies

Post by phil.e » 2018/04/25 16:56:56

The vast majority of the dependencies appear to be related to the Eclipse java development environment they use.

I removed 1.5 on a test system, made a list of everything getting removed, and then went through the list and reinstalled all the deleted packages after 1.5 was gone. Eclipse looked like it came up all right, but, not being a developer, I can't do as thorough a test as the developers can.

Is there a more elegant way to get an application to point to a different version of java than jumping through all these hoops? (maybe too broad of a question - each app is probably different)

User avatar
TrevorH
Forum Moderator
Posts: 23635
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to safely remove java with lots of dependencies

Post by TrevorH » 2018/04/25 17:30:02

Install the equivalent newer package set first then remove the old ones.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply