tl;dr: I ran yum update -y, then halfway a huge update (1.1GB) accidentally hit ctrl+C mid-way. This broke everything.

I tried:

  500  yum check all
  501  package-cleanup --problems
  502  package-cleanup --dupes
  503  package-cleanup --cleandupes
  504  yum-complete-transaction 
  505  yum update -y
  506  yum update --skip-broken -y
  507  yum-complete-transaction --cleanup-only
  508  yum update --skip-broken -y
  509  yum check all
  510  yum clean all
  511  yum makecache
  512  rpm --rebuilddb 
  513  yum update
  514  package-cleanup 
  515  package-cleanup --cleandupes
  516  package-cleanup --cleandupes --skip-broken
  517  yum history
  518  yum history undo 78
  519  yum history undo 78 --skip-broken
  525  package-cleanup --cleandupes
  526  package-cleanup --cleandupes --skip-broken

To no avail. Is there anything else I can try? This seems to be just about everything the internet suggests I can try.

It seems silly to me that yum breaks this easily, I mean how common is it that an update gets halted mid-way because of some error? I thought yum was enterprise software, also included in distros like RHEL. Even Windows knows how to recover from crashed/broken/canceled updates without much user intervention.. But ah well.

My system runs Linux chlorine 3.18.6-200.fc21.x86_64 #1 SMP Fri Feb 6 22:59:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux (Fedora 21).

My main issue seems to be here:

--> Finished Dependency Resolution
Error: Trying to remove "systemd", which is protected
Error: Trying to remove "yum", which is protected
** Found 394 pre-existing rpmdb problem(s), 'yum check' output follows:
ModemManager-1.4.4-2.fc21.x86_64 is a duplicate with ModemManager-1.4.0-1.fc21.x86_64

I haven't rebooted yet and my system is currently still running fine.

Any suggestions and ideas are greatly appreciated! If this thread doesn't work out then I'm probably going to reinstall my system.

  • You tried some things, but what was the output of the things you tried? Apr 9, 2015 at 15:01
  • All basically the same as what I put under "My main issue". I'll get a pastebin of the whole thing, the laptop is on standby right now, it might still work...
    – Alex
    Apr 9, 2015 at 15:02
  • yum clean all works, rpm --rebuilddb works, yum makecache works, here's a pastebin of 'yum check all' pastebin.com/ZS7jFPTV . if you want any specific output of anything, let me know.
    – Alex
    Apr 9, 2015 at 15:07
  • 1
    Is it possible to try yum distro-sync full? Read man yum to make sure this won't create different/more problems for you.
    – rickhg12hs
    Apr 10, 2015 at 4:21
  • @rickhg12hs Still haven't rebooted, so gave it a try :P but alas, no dice. says it has broken stuff, which I omitted with --skip-broken, which results in "trying to remove systemd, which is protected".
    – Alex
    Apr 24, 2015 at 22:10

1 Answer 1


I just did the same thing on a Fedora 22 system. I couldn't upgrade or reinstall any of the packages. Running package-cleanup --cleandups wanted to remove glibc, which wanted to pretty much all of the packages on the system.

To resolve the issue, I performed a distro-sync on all of the duplicate packages.

sudo package-cleanup --dupes | perl -pe 's/-\d+.*$//' | sort -u | grep -vP '^Loaded' | xargs sudo dnf distro-sync -y

Then followed up with

sudo dnf upgrade
sudo package-cleanup --cleandupes
  • Nice! I've long reinstalled my laptop, but I'll definitely keep this in mind next time I break a CentOS/RHEL/Fedora system. +1
    – Alex
    Aug 1, 2015 at 20:24
  • Also, I can't verify this is an actual answer to my question anymore, but I'll mark it as answer because the situation seems similar enough that it would've probably fixed my problem at the time.
    – Alex
    Aug 1, 2015 at 20:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .