Ask Your Question

How to synchronise the latest version of Fedora repo available with my computer ?

asked 2017-10-08 08:10:46 -0500

Nicryc gravatar image

Hi, What is the command line to force the synchronisation of the latest repository of Fedora available on the computer ? For example a package has been updated and is visible on the Fedora Update System website but when I do a dnf upgrade <package>, it isn't available yet. How do I synchronise the repo ? Thank you.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2017-10-08 14:09:54 -0500

ozeszty gravatar image

updated 2019-02-26 05:14:25 -0500

Hi, fresh packages might be getting to you later for few reasons:

  1. cache haven't expired since last metadata download, so dnf haven't checked if newer one is available
    • use --refresh parameter to force checking if newer metadata is available;
    • shorten metadata expiration time by adding/changing metadata_expire=time_in_seconds in /etc/dnf/dnf.conf
  2. updates haven't yet propagated to mirrors you're using - try forcing other mirrors just for that update (replace some-mirror-address):
    • for updates use dnf update --repofrompath updates-mirror,http://some-mirror-address/fedora/linux/updates/$(rpm -E %fedora)/$(arch)/
    • for updates-testing use dnf update --repofrompath updates-testing-mirror,http://some-mirror-address/fedora/linux/updates/testing/$(rpm -E %fedora)/$(arch)/.

Testing updates

To install or update package which is currently in testing, append --enablerepo=updates-testing to appropriate dnf command.

Each update's page on contains a code snippet (section "How to install") allowing to easily install it.

If updates are not yet in testing (or not yet propagated to mirrors - previous commands didn't find updates to install), you can download packages from

  • automatically cd $(mktemp -d) && koji download-build --arch=x86_64 kernel-4.20.12-200.fc29 && dnf update * where kernel-4.20.12-200.fc29 is an NVR (name-version-release) from koji
  • manually and install them with dnf install path_to_.rpm_package.

If you use dnf with -vparameter, it will print some useful info, e.g. metadata creation timestamp (you can compare it with to check whether you already have the latest one), or whether metadata cache is being used.

edit flag offensive delete link more


And how do you install a package which is currently in test ?

Nicryc gravatar imageNicryc ( 2017-10-13 06:53:23 -0500 )edit

I updated my answer with this explained.

ozeszty gravatar imageozeszty ( 2017-10-13 09:32:34 -0500 )edit

answered 2017-10-08 13:04:46 -0500

masteroman gravatar image

To force refresh of the repos use:

sudo dnf upgrade --refresh

Note that package version may not be distributed to all mirrors yet. That takes some time.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-10-08 08:10:46 -0500

Seen: 2,523 times

Last updated: Feb 26 '19