I just installed a shiny new Fedora 22 (KDE spin). I was running a
dnf update
when everything froze and I was forced to reboot (the cause of the freeze was the
nouveau
open source nvidia driver, and I hadn't got around to blacklisting and installing nvidia's driver yet). I was worried that things might be broken and went hunting for a
yum-complete-transaction
like thing but couldn't find one and since
dnf update
said "Nothing to do" I left it at that.
When I finally got around to installing the nvidia driver I noticed I had two kernels and couldn't boot from the more recent one (normally it's default). I ran a
dnf reinstall
for each of the newer
dnf list kernel\*
packages and everything was ok.
I noticed the real problem when
trying to install steam and eventually found out about
dnf repoquery --duplicated
which listed ~500 items (same pacakage, but slightly newer versions from the update). A potential problem was half the old packages were in use and half the newer ones were. I was thinking I could either remove the new ones and run
dnf update
again or remove the old ones and reinstall the new ones. Anyway, I decided I couldn't be bothered accounting for both cases and deleted the older ones (because I found
package-cleanup --cleandupes
still works and does it for me (it calls
yum
, but now that's just a script which calls
dnf
). Be careful it doesn't try to remove more than the duplicates (by checking against the list from above)!
dnf repoquery --duplicated | sed "1 d" > dupes
cat dupes | sed 's/^\(.*\)-[0-9]\+:.*/\1/' | sort | uniq | grep -v kernel > reinstall
package-cleanup --cleandupes #uses dnf via /bin/yum (now a passthrough + warning script)
Before saying yes to removing everything, check the file count in
reinstall
with the number about to be removed. Also note the
grep -v kernel
or dnf complains about reinstalling the running kernel next.
sudo dnf reinstall $(cat reinstall)
Finally the dupes are gone, except for the kernel (
dnf repoquery --duplicated
) and I can get back to installing steam.