While issuing any yum command, you would get an error shown below:

# yum list
Loaded plugins: fastestmirror, langpacks
Existing lock /var/run/yum.pid: another copy is running as pid 13023.
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: PackageKit
    Memory :  26 M RSS (430 MB VSZ)
    Started: Sat Sep 30 18:31:21 2017 - 00:33 ago
    State  : Sleeping, pid: 13023


The error indicates that another instance is running for the yum update, and it’s PID is 13023. Check for the PID in the ‘ps -ef’ command to see what process is holding yum lock.

# ps -ef | grep 13023
root      13023  11813  3 18:31 ?        00:00:04 /usr/bin/python /usr/share/PackageKit/helpers/yum/yumBackend.py refresh-cache yes

A GUI PackageKit utility installed in the system and is holding the yum lock while running regularly. You can use either of the methods given below to resolve the error. Sometimes killing the process ID used by PackageKit utility does not work. In that case, the only solution is to disable PackageKit or remove it completely.


Method 1: killing the process ID used by PackageKit


Kill the process which is holding the yum lock, for instance:


# kill -9 13023


# pkill PackageKit


then run the yum command again.


Remove/Disable PackageKit utility


Another way is to disable refresh-packagekit yum plug-in by editing refresh-packagekit configuration file /etc/yum/pluginconf.d/refresh-packagekit.conf :




Or you can erase PackageKit management utility from the system:


# yum remove -y PackageKit*


Was this answer helpful? 0 Users Found This Useful (0 Votes)