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.
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.
You can also try yum downgrade packagename, depending on the version of yum on your system.
repository - downgrade rpm package from experimental repo just by disabling the repo and yum update - Stack Overflow
RPM handling Upgrade and Downgrade like magic
How to repackage an rpm installed using dnf?
How to downgrade a package via zypper?
How do I downgrade an RPM package in Linux?
What is the difference between yum and rpm for downgrade?
How to prevent package upgrade after downgrade?
Newbie Ansible user, but long time tech geek here.
It behooves me that Ansible can’t upgrade or downgrade a RPM package natively without programming conditional logic within the tasks area.
version=1.2.3
Ansible should install {{ version }} if nothing exists.
Perform an upgrade until the versions match if a package DOES exist.
Or downgrade to {{ version }} if the version is lower than installed.
Does anyone else have the same frustration I do?
Puppet handled this scenario automagically.
Ansible ends up installing RPMs alongside the previous version unless “latest” is used, but if I use that, I can downgrade via the version variable seen above.
name: install specific version
yum:
name: httpd-1.2.3
state: presentWill result in this:
$rpm -qa | grep httpd $httpd-1.2.3 $httpd-1.2.2
Actually, downgrade wouldn't work for kernel. The right command would be localinstall:
#yum localinstall ./kernel....rpm
If you have more then 5 kernels yum will delete oldest.
rpm -ivh <kernel.rpm> --oldpackage
does the job in centos
This will install your kernel, now make sure the grub entries are proper and then you can reboot and boot into this kernal