How to Resolve Another app is currently holding the yum lock; waiting for it to exit…

I believe that some linux users, especially system administrators encountered this problem and get the message after issue the yum command:

    Existing lock /var/run/yum.pid: another copy is running as pid [pid number].
    Another app is currently holding the yum lock; waiting for it to exit...
    

Example :

    [root@server /]# yum install [service name]
    Loaded plugins: fastestmirror
    Existing lock /var/run/yum.pid: another copy is running as pid 20360.
    Another app is currently holding the yum lock; waiting for it to exit...
      The other application is: yum
        Memory :  19 M RSS (396 MB VSZ)
        Started: Sun Mar  6 21:06:51 2011 - 00:29 ago
        State  : Traced/Stopped, pid: 20360
    

Please hit ctrl-c; that’s the key combination to kill any currently running process in a bash shell or terminal.

    Exiting on user cancel.
    

Solution 1:
To remove the pid, please issue command rm -f and follow with yum.pid path and [pid number]

    [root@server /]# rm -f /var/run/yum.pid 20360
    

Solution 2:
Find out what is the locking up yum by running:

    [root@server /]# ps aux | grep yum
    

Please take note on the [pid number] of the process and run this command to kill the process:

    [root@server /]# kill -9 [insert pid]
    

19 comments on “How to Resolve Another app is currently holding the yum lock; waiting for it to exit…

  • Amit

    Truly good example

  • sheikh

    thanks you very much to help me to resolve this error

    THANK A LOOOOOOOOOOOOOOOOOOTe

  • nooz

    this command kill -9 disconnected the internet connection how can i get it back ?

  • Ram Iyer

    Will Solution 1 kill the yum process that is running? I don’t want that to happen sometimes when RHEL patch is running ..

  • pacho

    thanks!!!! solution 1 worked for me!

  • Peter Nguyen

    It is workable! Thank you very much!

  • senthamil

    Thank you so much it’s really very helpful

  • sivakumar

    Thanks

  • Ben

    The 1st solution helped for me. Thanks)

  • gopichand

    thnks

  • pawan

    not working: if killing the process or deleting yum.pid. error gets change to

    new error :failed to connect to 192.168.43.56:21; No route to host

  • Muhammad Tufail

    thanx to provide the solutions

  • Bibhudutta Baliarsingh

    Thank You Dear

  • openritwanz

    Thanks it works

  • Joseph

    o the following to solve the problem:

    cd /var/run
    rm -f yum.pid

    you could also update your yum afterward

    yum -y update

  • mohammad

    Thank you very much
    that’s great !

Leave a Reply

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

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>