How to downgrade JRE's version in Ubuntu?

7,715

When you downgrade, you'll probably want to keep it that way (having the update manager ignore the newer version), this list thread and the APT-HowTo seem to go through what's needed to do that.

Specifically check out How to keep a mixed system:

# apt-get install package=version

And How to keep specific versions of packages installed (complex), adding this to /etc/apt/preferences:

Package: <package>
Pin: <pin definition>
Pin-Priority: <pin's priority>

Update: To clarify some things: 1. Ubuntu 10.04 does not use Sun's JRE by default. Infact you need to enable repositories to install it.

As stated in my comments, just follow the above pattern:

apt-get install default-jre=1.6.0_17 

Or for Sun's

apt-get install sun-java6-jre=1.6.0_17 

But I doubt that will work, considering that the latest version of Sun's JRE is listed as 6.20.

Share:
7,715

Related videos on Youtube

jmj
Author by

jmj

Updated on September 17, 2022

Comments

  • jmj
    jmj over 1 year

    Currently I am having JRE 1.6.0_20. How do I downgrade it to JRE 1.6.0_17?

    How can I downgrade?

    I'm using Ubuntu 10.04 LTS.

    • Mokubai
      Mokubai almost 14 years
      You do know there is a security issue relating to remote code execution with Java < 1.6.0_20 don't you? Is there any reason you need that specific version such as missing features?
  • jmj
    jmj almost 14 years
    Thanks Tim Lyte for your time , i am trying it by downloading rpm packages externally . will let u know if it fails.
  • moneyt
    moneyt almost 14 years
    RPMs are meant for ReadHat (Fedora/CentOS/Etc), not Ubuntu/Debian. Look for a .deb file if you're trying to downgrade with a downloaded package.
  • jmj
    jmj almost 14 years
    no it takes older version (newer version previously installed), in my case it is java can you specify how can i install java jre&jdk 1.6.0_17 by apt-get ?
  • moneyt
    moneyt almost 14 years
    It really depends on what package you're installing. For Ubuntu's default (in 10.04) it would be apt-get install default-jre=1.6.0_17 Just follow the pattern given in my answer.
  • jmj
    jmj almost 14 years
    let me re ask this question apecifically
  • moneyt
    moneyt almost 14 years
    @abc, No, in 10.04 the default java isn't from sun, perhaps that's your problem.
  • jmj
    jmj almost 14 years
    yeah its openJdk, but when i fire apt-get install sun-java6-jre it installs the 1.6.0_20 update by default. i want to downgrade to 1.6.0_17
  • jmj
    jmj almost 14 years
    sudo apt-get install sun-java6-jre=1.6.0_17 Reading package lists... Done Building dependency tree Reading state information... Done E: Version '1.6.0_17' for 'sun-java6-jre' was not found
  • moneyt
    moneyt almost 14 years
    As noted in my updated answer, I don't think that version exists for Sun's JRE.