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

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • 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 re-create the yum cache (force a fetch of the cache data) from enabled repositories in CentOS/RHEL
  2. How to install and configure “setroubleshootd” on CentOS/RHEL
  3. How To Setup mutt in CentOS/RHEL
  4. Kernel Logs Warning Messages “kernel: Possible SYN flooding on port X. Sending cookies” is logged”
  5. Linux / UNIX : Examples of find command to find files with specific sets of permissions
  6. How to enable the automatic extension for a thin LVM volume
  7. How to Transfer files securely using SCP Command in Linux
  8. CentOS / RHEL 7 : How to disable IPv6 on a specific interface only
  9. How to Delete ASM Disk on Multipath Device in CentOS/RHEL
  10. Understanding MySQL Pluggable Authentication

You May Also Like

Primary Sidebar

Recent Posts

  • What are different Oracle Database Vault Roles
  • Unable to export realm protected table using data pump
  • Beginners Guide to Oracle Database Vault
  • How to Disable IPv6 on Ubuntu 18.04 Bionic Beaver Linux
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary