Yum Commands Always Result in “Killed”

Here’s some background;
I have a VPS that was giving a “Killed” message before any Yum command could finish
Some sample output is below

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.atlanticmetro.net
* epel: mirrors.mit.edu
* extras: mirror.atlanticmetro.net
* updates: mirror.atlanticmetro.net
debug                                                    | 2.5 kB     00:00
debug/primary_db                                         | 1.2 MB     00:00
Setting up Update Process
Killed

 

Things I tried;
Disabling the vz-repo, since I was unfamiliar with it and unfamiliar things scare me. Then I tried disabling all repos except the base repo, but still got the issue.
Many forums recommend using the following commands, and discussion always ended there….probably because it always worked.

rm -f /var/lib/rpm/__db*
rpm –-rebuilddb
yum clean all

These are to fix your broken RPM databases, which is supposedly how this problem always gets fixed….except for me.

 

What actually worked (tl;dr);
Restarting the server. No joke. Turned if off and back on again, and suddenly everything is fine. I was able to run “yum update”, “yum install phpmyadmin”, etc.

I am disappointed that restarting a Linux server is the magic bullet used to solve problems, but also happy that this wasn’t a production server.

3 thoughts on “Yum Commands Always Result in “Killed”

  1. No joke, but this solved the problem for me too. But I am worried because it’s a production server and will be an issue if this happens in the busy stage of the business. Thanks for the tip though.

    • I also encountered this problem, and would like to contribute my personal guess.

      This problem in some cases seems to be some sort of memory error, and therefore the Linux OS is not to blame, since this is a non-solvable problem with physics, an essential bit seems to have flipped resulting in something crashing. That is why the restart works, we’re essentially resetting the physical memory by reloading from disk i.e. restarting.

Leave a Reply to Nirmal Natarajan Cancel reply

Your email address will not be published. Required fields are marked *