Tuesday, April 5, 2022

[SOLVED] Installing a RPM package without deinstalling the old one

Issue

Does anybody know what would happen if a package gets installed, while the old package remains installed? The thing is that the command rpm -e <rpm_package> will uninstall and delete the old package. In my case, I want to keep the old package as a backup and I don't want it to get erased.

Is it possible to keep the old package available in the file system(without deleting it) while having installed the new one? Thanks in advance!


Solution

No, it is not possible.

It can happen that you have two package of the same name. But that is only possible when:

  • you terminate rpm during the transaction. You can then remove the correct one using full NEVRA. I.e., rpm -e bash-5.1.8-2.fc35.x86_64

  • when packages are multilib. I.e., one is i386 and the other x86_64

If you want to keep backups then I recommend either using 'local' plugin https://dnf-plugins-core.readthedocs.io/en/latest/local.html Just be aware that it can consume a lot of storage. Or even Red Hat Satellite, which allows you easy rollbacks. But that is likely big beast for your needs.



Answered By - msuchy
Answer Checked By - Mildred Charles (WPSolving Admin)