Fedora Account System
Red Hat Associate
Red Hat Customer
/var/lib/dnf has no owner. ls -l /var/lib/dnf/ total 7028 -rw-r--r--. 1 root root 1527808 Dec 17 19:49 history.sqlite -rw-r--r--. 1 root root 32768 Dec 17 19:49 history.sqlite-shm -rw-r--r--. 1 root root 5632072 Dec 15 02:03 history.sqlite-wal drwxr-xr-x. 1 root root 94 Nov 2 21:41 repos Reproducible: Always
/var/lib/dnf directory in Fedora 42 is by dnf-data-4.22.0-1.fc42.noarch package which is built from dnf component. Moving this bug report to that component.
But for dnf5 only systems, dnf-data is not needed.
I'm not sure whether DNF5 uses that directory for anything than importing DNF4 history into DNF5.
Directory where DNF5 stores its persistent data between runs. Default: ``/var/lib/dnf``. I saw this description from the source code.
That can be leftover from DNF4 sources. DNF5 sources refer /var/lib/dnf on few places: $ git grep '/var/lib/dnf' doc/dnf5.8.rst: /var/lib/dnf/ doc/dnf5.conf.5.rst: Default: ``/var/lib/dnf``. include/libdnf5/conf/const.hpp:constexpr const char * PERSISTDIR = "/var/lib/dnf"; libdnf5/transaction/Swdb.cpp: // extract persistdir from path - "/var/lib/dnf/" libdnf5/transaction/Swdb.hpp: static constexpr const char * defaultPath = "/var/lib/dnf/history.sqlite"; libdnf5/transaction/Transformer.cpp: * \param inputDir directory to load data from (e.g. `/var/lib/dnf/`) But most of them are dead code. It also constructs that path manually on other places. I will need a help from more knowledgeable DNF5 developers. But you are right that will be safer to track this issue in DNF5. There is not much we could do in DNF4 package as Fedora has a history of preserving unowned files indefinitely.
Then it's all up to you, I don't have enough knowledge about this, either. :)
We found that directory is still used by DNF5 for countme feature (a cookie reported to a Fedora mirror manager). We will fix DNF5 to own that directory.
So /var/lib/dnf/[history.sqlite history.sqlite-shm history.sqlite-wal] is actually useless in dnf5?
Those files are read on first dnf5 run. Later on they are useless for dnf5.
Merged upstream.
FEDORA-2025-f3bc917e71 (dnf5-5.2.8.1-3.fc41) has been submitted as an update to Fedora 41. https://bodhi.fedoraproject.org/updates/FEDORA-2025-f3bc917e71
FEDORA-2025-f3bc917e71 has been pushed to the Fedora 41 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-f3bc917e71` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-f3bc917e71 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2025-f3bc917e71 (dnf5-5.2.8.1-3.fc41) has been pushed to the Fedora 41 stable repository. If problem still persists, please make note of it in this bug report.