50

On a machine without yum, I have version 3.2 of a package installed and I have downloaded version 2.4 manually, how do I install the older version?

0
72

rpm -Uvh --oldpackage [filename]

--oldpackage allows you to install older versions, -U means "upgrade", but in this case it will just replace the other version. If you use -i instead of -U you will end up with both versions installed.

3
  • 6
    The vh arguments are optional here. Only -U (or --upgrade) and --oldpackage are necessary. – Dave Mooney Jul 18 '14 at 19:47
  • 2
    rpm -U --force [filename] also allows downgrades – Sasha Sep 8 '15 at 17:57
  • 2
    For kernels rpm -i --force <package url / filename> works (since you want to keep multiple versions) – Gert van den Berg Feb 9 '18 at 8:01
16

You can also try yum downgrade packagename, depending on the version of yum on your system.

3
  • 3
    You are correct, but OP specified "on a machine without yum" so either yum is broken or missing. – Criggie May 18 '17 at 5:08
  • 3
    At the time of this answer, "without 'yum'" was not part of the OP's question. Please see the edit history. – ewwhite Mar 23 '19 at 22:36
  • 1
    Best leave answer for completeness, and your comment clarifies why. – Criggie Mar 24 '19 at 1:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.