dnf
dnf copied to clipboard
"dnf check-update" vs "sudo dnf check-update"
This happens on my Fedora 39.
> dnf check-update
Last metadata expiration check: 0:57:53 ago on Sun Dec 31 12:32:35 2023.
bluez.x86_64 5.71-2.fc39 updates
bluez-cups.x86_64 5.71-2.fc39 updates
bluez-libs.x86_64 5.71-2.fc39 updates
bluez-obexd.x86_64 5.71-2.fc39 updates
xerces-c.x86_64 3.2.5-1.fc39 updates
> sudo dnf check-update
Last metadata expiration check: 0:24:15 ago on Sun Dec 31 13:06:22 2023.
> sudo dnf upgrade
Last metadata expiration check: 0:29:05 ago on Sun Dec 31 13:06:22 2023.
Dependencies resolved.
Nothing to do.
Complete!
Why is dnf answering to non-root only?
Hi, maybe it's because there are older metadata available for the root user. Try running f.e. sudo dnf check-update --refresh
.
I think that dnf should use a single local database, instead of allowing users to have their own local version.
I think that dnf should use a single local database, instead of allowing users to have their own local version.
That would be a RFE, and these are typically recommended to be filed against the successor dnf5 project. However, it currently requires significant reasons to implement, as our focus is on completing crucial functionality to achieve feature parity with dnf.
Cache sharing in dnf5 is already implemented, though in a slightly different manner. Documentation for this can be found here, and you can also refer to the preceding discussion here.
Since dnf demands su privileges to install packages, and rightly so, then perhaps dnf should be moved to /usr/sbin, also solving the problem here described. More explicitly, a non admin should be prevented from running dnf.
Since dnf demands su privileges to install packages, and rightly so, then perhaps dnf should be moved to /usr/sbin, also solving the problem here described. More explicitly, a non admin should be prevented from running dnf.
There are a lot of querying commands that could be run by an unprivileged user.
In case you want to run dnf just using the existing system cache, you can pass the -C
option (see docs here).
I am closing the issue as the original question "Why is dnf answering to non-root only?" was already answered.