Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

Fedora remove duplicate packages from partially-completed dnf update

On my Fedora 27 systems, my system froze up when I was updating all the packages (I suspect I'm having hardware problems). My system did reboot just fine, but not all ancillary services came up. During my troubleshooting, I discovered that there were multiple versions of packages installed for hundreds of packages. After some brief Internet searches, I found my solution:

sudo dnf remove --duplicates

Output will resemble:

Last metadata expiration check: 1:14:37 ago on Sat 31 Mar 2018 09:52:43 PM EDT.
Dependencies resolved.
================================================================================
 Package                       Arch   Version            Repository        Size
================================================================================
Reinstalling:
 ImageMagick                   x86_64 1:6.9.9.38-1.fc27  updates-example 186 k
     replacing  ImageMagick.x86_64 1:6.9.9.27-1.fc27
 ImageMagick-libs              x86_64 1:6.9.9.38-1.fc27  updates-example 2.3 M
     replacing  ImageMagick-libs.x86_64 1:6.9.9.27-1.fc27
 abrt                          x86_64 2.10.7-1.fc27      updates-example 525 k
     replacing  abrt.x86_64 2.10.5-1.fc27
 abrt-addon-ccpp               x86_64 2.10.7-1.fc27      updates-example 130 k
     replacing  abrt-addon-ccpp.x86_64 2.10.5-1.fc27
 abrt-addon-coredump-helper    x86_64 2.10.7-1.fc27      updates-example  40 k
     replacing  abrt-addon-coredump-helper.x86_64 2.10.5-1.fc27
 abrt-addon-kerneloops         x86_64 2.10.7-1.fc27      updates-example  54 k
     replacing  abrt-addon-kerneloops.x86_64 2.10.5-1.fc27
 abrt-addon-pstoreoops         x86_64 2.10.7-1.fc27      updates-example  32 k
     replacing  abrt-addon-pstoreoops.x86_64 2.10.5-1.fc27

References

Weblinks

  1. https://ask.fedoraproject.org/en/question/95550/how-to-remove-duplicate-packages-installed-with-dnf-on-fedora-24/

Comments