The DNF versionlock plugin prevents installed packages being removed

Solution Verified - Updated -

Issue

Using 'versionlock' to lock the version of a specific package prevents that package from being removed via "dnf" if the installed version of the package is different than the entry:

[root@lab-rhel8-1 user]# rpm -q bind-utils
bind-utils-9.11.4-26.P2.el8.x86_64
[root@lab-rhel8-1 user]# cat /etc/dnf/plugins/versionlock.list

# Added locks on Thu Dec  5 17:18:33 2019
bind-utils-32:9.11.4-17.P2.el8_0.1.*
[root@lab-rhel8-1 user]# yum remove bind-utils
Updating Subscription Management repositories.
No match for argument: bind-utils
No packages marked for removal.
Dependencies resolved.
Nothing to do.
Complete!

Environment

Red Hat Enterprise Linux 8
python3-dnf-plugin-versionlock-4.0.8-3.el8.noarch

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content