Last updated on November 28, 2020 by Dan Nanni
yum
command on [CentOS, Fedora or RHEL], I got the error saying that "Another app is currently holding the yum lock; waiting for it to exit... The other application is: PackageKit". PackageKit seems starting automatically in the background, interfering with yum
command. How can I disable PackageKit to avoid this yum
error?
PackageKit is a suite of programs designed for checking, updating, and (un)installing packages on a Linux system. When PackageKit is running in the background, it blocks any other software management initiated by users (e.g., with yum
command).
When you fail to run yum
command due to PackageKit holding the yum
lock, you can simply wait for PackageKit to finish, and then run yum
command again.
However, if PackageKit is really annoying to you, you can disable PackageKit. Here is how to turn off PackageKit on CentOS/RHEL-based system.
One way to get around PackageKit during yum
operation is to use --disableplugin
option with yum
command. This will temporarily disable PackageKit, and thus you can proceed without being interferred with by PackageKit.
$ sudo yum install --disableplugin=refresh-packagekit <package-name>
If you want to turn off PackageKit permanently, you can do the following.
$ sudo systemctl disable packagekitd
This will disable PackageKit permanently on the next boot.
Open /etc/yum/pluginconf.d/refresh-packagekit.conf
with a text editor, and change enabled=1
to enabled=0
.
$ sudo vi /etc/yum/pluginconf.d/refresh-packagekit.conf
enabled=0
A final approach is to simply remove PackageKit altogether.
$ sudo yum remove PackageKit
If you are encountering different types of errors while running yum
command, refer to this tutorial to fix them.
This website is made possible by minimal ads and your gracious donation via PayPal or credit card
Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.
Xmodulo © 2021 ‒ About ‒ Write for Us ‒ Feed ‒ Powered by DigitalOcean