Installing a RPM package without deinstalling the old one
Solution 1:
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.