• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Yum Command Fails with “Another app is currently holding the yum lock” in CentOS/ RHEL 7

by admin

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 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 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

or

# 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 :

[main]
enabled=0

Or you can erase PackageKit management utility from system:

# yum remove -y PackageKit*

Filed Under: CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. How to work with multiple java versions under Linux
  2. CentOS / RHEL 6 : How to configure 802.1q VLAN On NIC
  3. mkfs.ntfs Command Examples in Linux
  4. CentOS / RHEL 6,7 : Why the files in /tmp directory gets deleted periodically
  5. partprobe Command Examples in Linux
  6. How to exclude a file/directory from auditd rules
  7. check-support-status: command not found
  8. mkswap Command Examples in Linux
  9. chronyc : command not found
  10. mv: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • qm Command Examples in Linux
  • qm wait Command Examples in Linux
  • qm start Command Examples in Linux
  • qm snapshot Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright