How to disable PackageKit on CentOS, Fedora or RHEL

Question: When I tried to install a package with 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 RedHat-based system.

Disable PackageKit Temporarily

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>

Disable PackageKit Permanently

If you want to turn off PackageKit permanently, edit the following file, and change "enabled=1" to "enabled=0". This will disable PackageKit permanently.

$ sudo vi /etc/yum/pluginconf.d/refresh-packagekit.conf
enabled=0

Alternatively, you can simply remove PackageKit altogether.

$ sudo yum remove PackageKit

Subscribe to Ask Xmodulo

Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A straight to your email box, for free. Delivery powered by Google Feedburner.

Leave a comment

Your email address will not be published. Required fields are marked *

Current ye@r *