How to Resolve Another app is currently holding the yum lock

Sometimes you face a yum lock issue, especially Linux Administrator face this problem and get the message after the use of the yum command. This issue occurs when you use the 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:

The first solution is that remove the PID (process ID). To remove the PID (process ID) we use the 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!

Comments
  1. 6 years ago

Leave a Reply

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

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.