I’ve had a couple of problems recently, BBC news videos fail on Firefox and Files hangs accessing secondary disks, so I’m trying to do a software update using “Gnome Software”, but it fails with:
Cannot download Packages/s/selinux-policy-targeted-42.21-1.fc43.noarch.rpm: All mirrors were tried; Last error: Status code: 404 for https://ask4.mm.fcix.net/fedora/linux/updates/43/Everything/x86_64/Packages/s/selinux-policy-42.21-1.fc43.noarch.rpm (IP: 78.109.176.29)
Edit: I did manage to install some new software, but when I tried to submit a review, it “Failed to submit review.
I have used sudo dnf update software to update Software, but that doesn’t help.
I use the command line to perform updates, which gives more informative messages as it progresses.
sudo dnf upgrade is all it takes.
ChatGPT says:
Cause:
Out-of-sync Fedora mirrors + cached metadata pointing to a package that no longer exists.
Fix:
sudo dnf clean all
sudo rm -rf /var/cache/dnf
sudo dnf makecache
sudo dnf distro-sync
pkcon refresh force # or restart
It answered my question and it works.
1 Like
Note:
Those commands are different in that dnf (actually dnf5) works with a different cache (/var/cache/libdnf5/). While pkcon (and gnome software) use dnf4 which is the cache path you removed (/var/cache/dnf).
This means the dnf command is working with a totally different cache than either pkcon or the gnome software app.
What you did to solve the gnome software problem was mostly correct, but a user must be aware of the differences between using dnf (dnf5) and gnome software (dnf4).