Due to an aborted yum update, I'm stuck with duplicate package dependencies. I'm trying to use the command "rpm -e --justdb $package" to remove one of the duplicates, but both packages have dependencies (See below). I could see a solution where I remove all the dependencies and reinstall them, but this could turn out to be a rabbit hole. Or worse, I could break something by removing a package that I shouldn't.

I also tried to upgrade (both yum and rpm) to the latest version of the package hoping that the dependencies would move to the new version, but I just get a "Failed dependencies" error.

# Two different versions of systemd-libs are installed
$ sudo rpm -e --justdb --test systemd-libs-219-19.el7_2.13.x86_64
error: Failed dependencies:
        libsystemd.so.0()(64bit) is needed by (installed) cups-1:1.6.3-22.el7.x86_64
        libsystemd.so.0(LIBSYSTEMD_209)(64bit) is needed by (installed) cups-1:1.6.3-22.el7.x86_64
        systemd-libs = 219-19.el7_2.13 is needed by (installed) libgudev1-219-19.el7_2.13.x86_64

$ sudo rpm -e --justdb --test systemd-libs-208-20.el7_1.6.x86_64
error: Failed dependencies:
        systemd-libs = 208-20.el7_1.6 is needed by (installed) systemd-208-20.el7_1.6.x86_64

Is it possible to resolve this or am I screwed?


You have a couple of options.

# yum-complete-transaction

Or, if that command returns that there's no unfinished transactions...

# package-cleanup --cleandupes

And then re-run yum update.

  • yum-complete-transaction gives No unfinished transactions left. package-cleanup --cleandupes gives --> Finished Dependency Resolution Error: Trying to remove "systemd", which is protected Error: Trying to remove "yum", which is protected You could try using --skip-broken to work around the problem – teemoleen Nov 22 '16 at 1:04

You should just finish that yum transaction. Run:

# yum-complete-transaction

You can add the --nodeps option on the rpm command line which disables dependancy testing thus allowing you to complete the erasure of a specific rpm package.

  • 1
    I see this will allow for the removal of the duplicate package, but what will it do to the orphaned dependency? – teemoleen Nov 22 '16 at 1:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.