Dnf update up to a date/time

Is it possible to ‘dnf update’ packages new to the repos before a particular date/time?

I am administering a large number of Fedora machines and I want to be able to test and confirm the updates don’t break anything before updating. So on my test machine I will update at say 2021-09-22 12:00:00 and test. Then if everything is OK I’d like to upgrade all the systems with new packages but not with any that were added after that date. Is there any (simple) way to do this?

1 Like

Hrm, not really. The mirrors probably have metadata about when something was synced to them but this information is not available to dnf since the time of an update being pushed is not really important.

Would it not be better to do it based on version? I.e., update your system, see what versions work for you, and then limit updates to all your machines to the particular version? Getting the versions of installed packages is up to you, but ideally you can just get the complete set of packages using rpm -qa and then pass that to dnf to “install”, where it should then pull these versions from the updates repository and install them for you by upgrading older ones.

How I go about it for my couple of machines is to sort of piggy back on the QA that all updates go through. I have updates-testing enabled on one of them, so that way I test the updates out and give karma etc. If an update is broken, I (and other folks) give negative karma and prevent it from being pushed out to my second machine (and all other users):

https://fedoraproject.org/wiki/QA:Updates_Testing

That’s what I thought… (which is what I qualified the question with ‘simple’ :smiley_cat:)

I think I can use ‘dnf history’ on the exemplar system to get the updated versions (to specify for the other systems).

1 Like

Yeh, that should work, especially if all your machines have identical packages.

As an idea, an alternative that however need a bit of work and configurations, could be a local mirror that you sync with the main repository at your own peace. But if you administer a lot of machines it would worth the efforts.

3 Likes