Dnf update and discover


Several Support Sites mention “dnf update” as an alias for “upgrade”. But “dnf alias” says there are none defined.

Second thing that I need to learn: which place has most up to date documentation? The command-line help via “–help” or man pages exist which is good. But they are aging. Is there a suggested “Fedora way”?

The third and last part is a strange one. I am afraid that it could be used as proof that I am an idiot. But I observe recently with the KDE flavour, that “dnf upgrade” does not catch all available updates. I need to run “discover” and activate its updating feature. Could somebody explain this, please?

what version of fedora are you using? I been using fedora KDE and I haven’t ran into those issues. It seems like there might be a project sync issue that when you launch discover it does a proper update there.

There is a time delay between times when the metadata is pulled from the repos to sync. Often one may need to run dnf upgrade --refresh which forces an immediate metadata sync with the repo and the latest updates may then be seen. The cached metadata might be out of sync for a short time (until the next regular sync) when new updates are released

update is indeed a deprecated alias for upgrade.

The aliases mentioned in the dnf manual are defined in the code. dnf alias is for user aliases.

Ideally, all packages include docs (so you can refer to them without Internet access), and all included docs are up to date. This is usually true for important or popular programs. Lesser used programs can sometimes fall behind. If you find any docs are outdated, incorrect, or missing, the best thing to do is fix it upstream, so that it benefits everyone using the software, not just Fedora.

man may be ancient, but it’s still the current system, at least for command-line programs. It’s not going away.

In the case of dnf, the manual on your system (man dnf) and the online docs have the same contents; the only difference is formatting. Some GNU programs like coreutils and bash provide extended docs in info format (compare info head vs man head).

Some packages include extra docs in /usr/share/doc. These might be a Fedora-specific README added by the package maintainer, or miscellaneous files from upstream that weren’t written for a proper system like man pages. Sometimes GUI programs dump HTML docs here and don’t link to it from a Help menu…

KDE Discover (and GNOME Software) not only handles rpm packages (like dnf), but also Flatpaks and firmware updates. See Software Repositories & Tools :: Fedora Docs

1 Like

As already mentioned, this could be due to two things:

Firstly, Discover uses PackageKit to update RPMs from the Fedora repositories, instead of using dnf. PackageKit and dnf do not share their caches and metadata about the repos, and they don’t necessarily refresh their caches at the same time. When you run Discover it always refreshes the PackageKit repo metadata (which makes it reaaaaallly slow sometimes) so you always see an up-to-date set of updates in Discover. When you run dnf it checks how old its cached data is, and doesn’t refresh it unless it’s older than the metadata_expire configuration variable:

$ sudo dnf update
Last metadata expiration check: 0:32:21 ago on Thu 08 Jun 2023 09:06:40 BST.

The fedora-updates repo is configured with metadata_expire=6h (see /etc/yum.repos.d/fedora-updates.repo)

The second reason Discover updates more than dnf is that Discover is a front-end to several different backends: PackageKit (for updating RPMs), Flatpak (for updating self-contained, sandboxed applications), and fwupd (for updating firmware on your motherboard and peripherals). DNF only manages RPMs, so will never show you updates to flatpaks or firmware, even if you use dnf update --refresh.

To update everything from the command-line without using Discover you would need to do all of:

sudo dnf update --refresh
sudo fwupdmgr get-updates
sudo flatpak update
1 Like

I would suggest at … Fedora Documentation :: Fedora Docs

1 Like