I want to install an older version of package <x>
, and when I use dnf
it only shows the current version of the package <x>
.
Is there any way to install an older versions using dnf
?
You can install using a specific name-version as described in the man page:
dnf install tito-0.5.6-1.fc22
Install package with specific version. If the package is already installed it will automatically try to downgrade or upgrade to specific version.
To view all versions of a package in your enabled repositories, use:
dnf --showduplicates list <package>
list
command you give in your answer does not show any previous versions of a package. AFAICT it only shows the current version. Have you tried it?
Commented
Jan 2 at 17:47
Yes. You can install older version of package using dnf downgrade package-name[-version]
if you already installed new one. But the old version still needs to be available on mirrors.
If the package is not available from mirrors, you can always download it manually from koji and then use dnf
to downgrade such as dnf downgrade path/to/downloaded.file.rpm
. But with this technique, you might need to resolve dependencies on your own.
dnf update
you will get the updates including security fixes.
dnf install path/to/downloaded.file.rpm
.
You can perform a simple downgrade by:
sudo dnf downgrade <package-name>
For instance:
sudo dnf downgrade podman