Apparently Java may have been installed outside of rpm
package management.
In that case, you could just do a mv /dir/java /dir/java.to-be-removed
, then verify that nothing essential gets broken by this.
If all seems OK, then remove any references to /dir/java/bin
in system-wide PATH
and MANPATH
settings (check /etc/environment
, /etc/profile
, and the files in /etc/profile.d
directory if it exists) , delete any system-wide JAVA_HOME
environment variable settings, and finally remove the /dir/java.to-be-removed
directory altogether.
You might also check that /usr/local/bin
directory doesn't contain any now-broken symbolic links pointing to the various tools within /dir/java/bin
.
rpm
(oryum
/dnf
), so it's not in the database. – Aaron D. Marasco May 31 '19 at 0:09