Existing lock /var/run/yum.pid: another copy is running as pid 523.

I‘m running the command yum update -y and getting the following error:

ADVERTISEMENTS

Loaded plugins: fastestmirror, priorities
Existing lock /var/run/yum.pid: another copy is running as pid 523.
Another app is currently holding the yum lock; waiting for it to exit…

The other application is: yum-updatesd-he
Memory : 14 M RSS ( 26 MB VSZ)
Started: Tue Feb 9 08:19:02 2010 – 14 day(s) 11:47:39 ago
State : Sleeping, pid: 523
Another app is currently holding the yum lock; waiting for it to exit…
The other application is: yum-updatesd-he
Memory : 14 M RSS ( 26 MB VSZ)
Started: Tue Feb 9 08:19:02 2010 – 14 day(s) 11:47:41 ago
State : Sleeping, pid: 523

How do I fix this problem?

Run the following command to find out process associated with yum command:
# ps aux | grep -i yum
Sample outputs:

root       523  0.0  0.7  27128 14624 ?        SN   Feb09   0:00 /usr/bin/python -tt /usr/libexec/yum-updatesd-helper --check --email --email-from=vivek@nixcraft.net.in --email-to=vivek@nixcraft.net.in --smtp-server=localhost:25 --sendmail
root      2875  0.0  0.5  26456 10620 ?        SN   Jan23   0:00 /usr/bin/python -tt /usr/sbin/yum-updatesd
root     25840  0.0  0.6  24224 12800 ?        Ss   11:58   0:14 /usr/bin/python /usr/bin/yum update -y
root     26665  0.1  0.6  24228 12784 ?        Ss   20:02   0:00 /usr/bin/python /usr/bin/yum update -y
root     26785  0.0  0.0   4128   608 pts/0    S+   20:06   0:00 grep yum

Kill PID 523, 25840, and 26665:
# kill -9 523
# killall -9 yum

Now run the following:
# yum update -y
Make sure you start yum-updatesd:
# /etc/init.d/yum-updatesd start

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
16 comments… add one
  • chris Sep 19, 2010 @ 18:24

    become root. su

  • adil Nov 30, 2010 @ 10:49

    thank you

  • ToNy Aug 6, 2011 @ 17:14

    thank you very much.
    it’s work!!

  • Muddassar Dec 8, 2011 @ 4:24

    Yes it worked for me. Thanks

  • Muddassar Dec 8, 2011 @ 4:26

    Can you tell me what “-9” is for, as when i entered this to kill process, it ask me to enter pid and didnt recognize “-9”.

  • Spyder01 Dec 10, 2011 @ 22:59

    Muddasser: -9 is a SIGKILL, so it wouldn`t wait until there is a signal to end it normaly. The -15 is SIGTERM and default, it first sends an end signal and the process will be killed on a clean way. -9 works only for killall, the kill command uses default SIGTERM.

  • R-Sham Jan 17, 2012 @ 8:08

    Thank U very much, it works! :D

  • jalal Mar 27, 2013 @ 7:26

    I got this problem but i solved but running this command..

    rm -rf /var/run/yum.pid

    • pierluigi Jun 23, 2013 @ 13:26

      Thanks jalal, rm -rf /var/run/yum.pid did the trick for me.

  • Vimal Aug 31, 2013 @ 4:33

    thanks for your helpful services..

  • harry Jul 4, 2014 @ 12:02

    thank you jalal.. trick worked for me too

  • Mauricio Dec 2, 2014 @ 13:11

    Thanks!!

  • Park Sep 1, 2015 @ 3:06

    thanks :)

  • clemsey Jan 29, 2016 @ 19:58

    rm -rf /var/run/yum.pid works for me ; using Centos7

  • Min Ko Sep 15, 2016 @ 5:30

    thank you very much.
    its work!!

  • dish Sep 24, 2016 @ 18:44

    “# killall -9 yum” is not working for me.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.