Dnf upgrade to a specific release

Amazon Linux has the feature/capability where you can run something like:
dnf upgrade --releasever=2023.5.20241001

This upgrades the OS/Kernel and packages to that specific release version.
We do that to ensure that a specific set of instances are at the same OS/Kernel/packages so there is no delta as far as the underlying OS is concerned. We will cycle through dev/test/prod instances and have them all at the same relase version.

Is there a capability of doing that with RockyLinux9?

No, Rocky doesn’t have that. If you want to do something like that perhaps you should be using RHEL which allows pinning to a certain version.

You could in theory change the /etc/yum.repos.d/*.repo files to use vault urls and that are for say Rocky 8.9 or 9.3 as an example.

@bigbmn for most $releasever/*/$basearch/os/ there is also $releasever/*/$basearch/kickstart/

RHEL (and hence Rocky) releases a new point release every six months. The kickstart is created as copy of the os.
Between point releases, some packages may get security or bug fixes. These are added to the os. The DNF is configured to use the os as repo.
When new point release is out, all of the old is moved to the vault.

Therefore, the kickstart subdirectories should have the initial package versions for the lifetime of the point release. Not trivial to reach, but closest to “tag on all packages”.


In principle, if you do use config management system, like Ansible, Chef, Puppet, etc, then you could perhaps list packages with version in order to get specific version installed. That is not trivial either.


If you do run dnf up for all dev/test/prod instances, then they do all get what is available at that point in time.


The Enterprise Linux distros are “stable” by design. By “stable” they mean that the underlying OS does not get “significant delta” during entire lifetime of major version, and definitely not within a point update. If an OS bugfix during point update’s lifetime does break your application, then your application relies on broken features. Is that good design on your part?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.