How to Resolve Another app is currently holding the yum lock

Share It!

Sometime you face a yum lock issue, especially Linux Administrator face this problem and get the message after the use of yum command. This issue occurs when you use yum command. You get the message as below:

yum

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:

# yum install php-fpm

Output:

Loaded plugins: fastestmirror
Existing lock /var/run/yum.pid: another copy is running as pid 11325.
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: 11325

At this time Please hit “ctrl-c” to kill any currently running process in a bash shell or terminal.

Solution 1:

First solution is that remove the pid (process ID). To remove the pid (process ID) we use rm command as follow:

# rm -f /var/run/yum.pid 11325

Solution 2:

Run the following command to find out which process is the locking up yum by running:

# ps -ef | grep yum

Output:

root       11325   2932 21 04:37 pts/1    00:00:00 /usr/bin/python /usr/bin/yum update
root       10235   2748  0 04:37 pts/0    00:00:00 grep --color=auto yum

Please copy the pid (process ID) and run the following command to kill the process:

# kill -9 [insert pid]

Example:

# kill -9 11325

Enjoy it!

Leave a Reply

Your email address will not be published.