How to Resolve Another app is currently holding the yum lock – Rhel – Fix Yum Lock issue – Centos



How to Resolve Another app is currently holding the yum lock – Rhel – Fix Yum Lock issue – Centos

How to Resolve Another app is currently holding the yum lock - Rhel - Fix Yum Lock issue - Centos

#yumlock #rhel #centos #linux #yum #troubleshootinglinux #linuxadmin
How to Resolve Another app is currently holding the yum lock – Rhel – Fix Yum Lock issue – Centos

If you are working with Linux environment, you must have once in your carrier ended up with this error “another app is currently holding the yum lock” or “Existing lock /var/run/yum.pid: another copy is running as pid XXX” while executing yum. I mostly use RHEL/CentOS environment in my work life so will only talk about this distribution.

Now this error “another app is currently holding the yum lock” is seen mostly with older yum versions especially with YUMv3 which was part of RHEL/CentOS 6 and also some versions of RHEL/CentOS 7. Now with RHEL 7.7, Red Hat has moved to YUMv4. We will discuss about the change in later part of this article.

For now let’s see how you can overcome and fix “another app is currently holding the yum lock” error. For the sake of this article I have manually simulated this error by running two parallel yum sessions on different terminals using RHEL/CentOS 7.

with every execution of yum, it will create /var/run/yum.pid file and add the PID of the process in this file.

# cat /var/run/yum.pid ( command to check the pid of the process holding the yum lock)

So we know there is a process with PID locking yum.
To get more details you can use “ps -ef” as shown below
# ps -ef | grep 8106 (process id)

So either you can wait for that process to complete or you can manually kill the process
# kill -9 8106 (Process id)

Lastly I hope the steps to fix another app is currently holding the yum lock error on RHEL/CentOS Linux was helpful.

#linux #rhel7 #troubleshooting #linuxcommands #linux_tutorial #centos7 #centos #yum #yumlocked #pid #processid #grep