Why did dnf info and dnf search initiate updates Fedora 38?
I was looking for a package and ran dnf search
to see if I had it before installing from source and a bunch of system updates started. I killed the process, thought weird and ran dnf info
to see if I could find some other info. That too started running updates though it kept asking repeatedly if I importing a GPG key
for postgres (starting with 15 then 14 then 13) was ok.
I’ve never seen this happen before. Can anyone explain the gist of it and hopefully provide docs where I can read more. Is this standard behavior for dnf
?
Here’s a copy paste from the terminal window:
[nick@nicks-x1 project]$ dnf search valgrind
Copr repo for PyCharm owned by phracek 33 kB/s | 45 kB 00:01
Brave Browser - Beta 24 kB/s | 15 kB 00:00
determining the fastest mirror (144 hosts).. done. [ === ] --- B/s | 0 B --:-- ETA
Fedora 38 - x86_64 2.2 MB/s | 83 MB 00:37
Fedora 38 openh264 (From Cisco) - x86_64 773 B/s | 2.5 kB 00:03
Fedora Modular 38 - x86_64 1.5 MB/s | 2.8 MB 00:01
^CFedora 38 - x86_64 - Updates 0.0 B/s | 0 B 00:00
Error: Failed to download metadata for repo 'updates': Librepo was interrupted by a signal
[nick@nicks-x1 project]$ man dnf
[nick@nicks-x1 project]$ dnf info valgrind
Fedora 38 - x86_64 - Updates 2.2 MB/s | 32 MB 00:14
Fedora Modular 38 - x86_64 - Updates 1.5 MB/s | 2.1 MB 00:01
google-chrome 13 kB/s | 3.6 kB 00:00
pgadmin4 427 B/s | 833 B 00:01
pgadmin4 3.8 MB/s | 3.8 kB 00:00
Importing GPG key 0x210976F2:
This is normal behaviour; dnf
is synchronizing its metadata from the configured repositories. It is not actually updating any of the packages on your system, only the information about packages available in repositories.
You don’t see this every time you run dnf
because it caches this data and only updates it if it’s too old. The cache timeout is configured using the metadata_expire
entry in dnf.conf
(and in repository metadata), and is set to 48h by default.
You can avoid this with dnf -C
; dnf
will then operate using only its locally-cached metadata.