Sunday, November 1, 2015

How to find ALL available versions of a package in yum repository?


--I have 1.6.0-sun-1.6.0.45-1jpp.1.el5_9 version of java installed on my systems

# rpm -q java-1.6.0-sun
java-1.6.0-sun-1.6.0.45-1jpp.1.el5_9



--I need to downgrade or upgrade to specific version of java-1.6.0-sun. Now I need to find what i have in my repository.Simple list and search does not help here.

  --Command list       : show installed version and most recent version (for all arch).
  --Command search : shows all package matching with search string - demo, develp, src, jdbc etc.


# yum list java-1.6.0-sun
Installed Packages
java-1.6.0-sun.x86_64             1:1.6.0.45-1jpp.1.el5_9                    installed
Available Packages
java-1.6.0-sun.i586               1:1.6.0.81-1jpp.1.el5_10                   rhel-x86_64-5-oracle_java
java-1.6.0-sun.x86_64             1:1.6.0.81-1jpp.1.el5_10                   rhel-x86_64-5-oracle_java
#
#
# yum search  java-1.6.0-sun
============= Matched: java-1.6.0-sun ===================
java-1.6.0-sun.x86_64 : Sun Java Runtime Environment
java-1.6.0-sun.i586 : Sun Java Runtime Environment
java-1.6.0-sun-demo.x86_64 : Demonstration files for Sun JDK
java-1.6.0-sun-demo.i586 : Demonstration files for Sun JDK
java-1.6.0-sun-devel.x86_64 : Sun Java Development Kit
java-1.6.0-sun-devel.i586 : Sun Java Development Kit
java-1.6.0-sun-jdbc.x86_64 : Sun Java JDBC/ODBC bridge driver
java-1.6.0-sun-jdbc.i586 : Sun Java JDBC/ODBC bridge driver
java-1.6.0-sun-plugin.i586 : Sun Java browser plugin
java-1.6.0-sun-plugin.x86_64 : Sun Java browser plugin
java-1.6.0-sun-src.x86_64 : Source files for Sun JDK
java-1.6.0-sun-src.i586 : Source files for Sun JDK




--I need to use  list and search with --showduplicates  options.


# yum list   'java-1.6.0-sun' --showduplicates
Installed Packages
java-1.6.0-sun.x86_64   1:1.6.0.45-1jpp.1.el5_9     installed
Available Packages
java-1.6.0-sun.x86_64   1:1.6.0.5-1jpp.2.el5_1      rhel-x86_64-5-oracle_java
java-1.6.0-sun.x86_64   1:1.6.0.5-1jpp.2.el5_1      rhel-x86_64-server-supplementary-5
java-1.6.0-sun.x86_64   1:1.6.0.6-1jpp.1.el5        rhel-x86_64-5-oracle_java
java-1.6.0-sun.x86_64   1:1.6.0.6-1jpp.1.el5        rhel-x86_64-server-supplementary-5
      . . . . . .
java-1.6.0-sun.x86_64   1:1.6.0.25-1jpp.1.el5       rhel-x86_64-5-oracle_java
java-1.6.0-sun.x86_64   1:1.6.0.25-1jpp.1.el5       rhel-x86_64-server-supplementary-5
java-1.6.0-sun.i586     1:1.6.0.26-1jpp.1.el5       rhel-x86_64-5-oracle_java
java-1.6.0-sun.x86_64   1:1.6.0.26-1jpp.1.el5       rhel-x86_64-5-oracle_java
      . . . . . .
java-1.6.0-sun.x86_64   1:1.6.0.75-1jpp.3.el5_10    rhel-x86_64-5-oracle_java
java-1.6.0-sun.i586     1:1.6.0.81-1jpp.1.el5_10    rhel-x86_64-5-oracle_java
java-1.6.0-sun.x86_64   1:1.6.0.81-1jpp.1.el5_10    rhel-x86_64-5-oracle_java




# yum search   'java-1.6.0-sun' --showduplicates|less
================= Matched: java-1.6.0-sun ===================
1:java-1.6.0-sun-1.6.0.10-1jpp.2.el5.x86_64 : Sun Java Runtime Environment
1:java-1.6.0-sun-1.6.0.10-1jpp.2.el5.x86_64 : Sun Java Runtime Environment
1:java-1.6.0-sun-1.6.0.11-1jpp.1.el5.x86_64 : Sun Java Runtime Environment
1:java-1.6.0-sun-1.6.0.11-1jpp.1.el5.x86_64 : Sun Java Runtime Environment
      . . . . . .
1:java-1.6.0-sun-1.6.0.81-1jpp.1.el5_10.i586 : Sun Java Runtime Environment
1:java-1.6.0-sun-1.6.0.81-1jpp.1.el5_10.x86_64 : Sun Java Runtime Environment
      . . . . . .
      . . . . . .
1:java-1.6.0-sun-devel-1.6.0.10-1jpp.2.el5.x86_64 : Sun Java Development Kit
1:java-1.6.0-sun-devel-1.6.0.10-1jpp.2.el5.x86_64 : Sun Java Development Kit
      . . . . . .
1:java-1.6.0-sun-devel-1.6.0.81-1jpp.1.el5_10.i586 : Sun Java Development Kit
1:java-1.6.0-sun-devel-1.6.0.81-1jpp.1.el5_10.x86_64 : Sun Java Development Ki
      . . . . . .
      . . . . . .
1:java-1.6.0-sun-plugin-1.6.0.10-1jpp.2.el5.i586 : Sun Java browser plugin
1:java-1.6.0-sun-plugin-1.6.0.10-1jpp.2.el5.i586 : Sun Java browser plugin
      . . . . . .
1:java-1.6.0-sun-plugin-1.6.0.81-1jpp.1.el5_10.i586 : Sun Java browser plugin
1:java-1.6.0-sun-plugin-1.6.0.81-1jpp.1.el5_10.x86_64 : Sun Java browser plugin
      . . . . . .
      . . . . . .
1:java-1.6.0-sun-src-1.6.0.10-1jpp.2.el5.x86_64 : Source files for Sun JDK
1:java-1.6.0-sun-src-1.6.0.10-1jpp.2.el5.x86_64 : Source files for Sun JDK
      . . . . . .
1:java-1.6.0-sun-src-1.6.0.81-1jpp.1.el5_10.i586 : Source files for Sun JDK
1:java-1.6.0-sun-src-1.6.0.81-1jpp.1.el5_10.x86_64 : Source files for Sun JDK

No comments:

Post a Comment