YUM-VERSIONLOCK(8)

πŸ‘‘ YUM-VERSIONLOCK πŸ‘‘

okay so this is the yum-versionlock page β€” section 8 of the manual, and it ships with dnf-plugins-core. short version: it's a lil redirect bestie, it points u straight at the DNF versionlock Plugin. πŸ’…


✨ DESCRIPTION ✨

so versionlock is a plugin that grabs a set of names and versions for packages, and then excludes every other version of those packages. that's the whole gig. it's how u protect ur precious packages from getting updated by newer versions πŸ›‘οΈ

buuut it can also flip it: u can hand it one specific package version to exclude from updates instead. like when u gotta skip a specific release of a package that has known issues. so it works both directions, icon.

the plugin gives u a command, versionlock, which lets u view and edit the list of locked packages easily. no cap, super chill.

here's the actual mechanics, and this part matters: the plugin walks each line of the versionlock file, and parses out the name and version of the package. then it excludes any package by that name that doesn't match one of the versions listed within the file. this is basically the same as using dnf --exclude for the package name itself (as you cannot exclude installed packages), but dnf will still see the versions you have installed/versionlocked as available so that dnf reinstall will still work, etc. 🫢

it can also work in the opposite way, like a fast exclude, by prefixing a ! character to the version recorded in the lock list file. this specifically excludes a package that matches the version exactly.

⚠️ heads up bestie: the versionlock plugin does not apply any excludes in non-transactional operations like repoquery, list, info, etc. so don't come for it when ur just peeking πŸ‘€

🌈 SYNOPSIS 🌈

dnf versionlock [options] [add|exclude|list|delete|clear]
[<package-name-spec>]

πŸŽ€ ARGUMENTS πŸŽ€

  • <package-name-spec> β€” the package spec to lock or exclude. that's it, that's the argument ✨

πŸ¦‹ SUBCOMMANDS πŸ¦‹

πŸ’– dnf versionlock add <package-name-spec>

adds a versionlock for all available packages matching the spec. what that means, fr fr: only versions of packages represented by <package-name-spec> will be available for transaction operations. each <package-name-spec> gets converted to concrete NEVRAs which are used for locking. and the NEVRAs to lock to are first searched among installed packages, and then (if none is found) in all currently available packages. cute, right?

Examples:

locking a package to the version installed:

$ dnf repoquery --installed bash
bash-0:5.0.7-1.fc30.x86_64

$ dnf repoquery bash
bash-0:5.0.2-1.fc30.i686
bash-0:5.0.2-1.fc30.x86_64
bash-0:5.0.7-1.fc30.i686
bash-0:5.0.7-1.fc30.x86_64

$ dnf versionlock add bash
Adding versionlock on: bash-0:5.0.7-1.fc30.*

locking a not-installed package to any of the available versions:

$ dnf repoquery --installed mutt

$ dnf repoquery mutt
mutt-5:1.11.4-1.fc30.x86_64
mutt-5:1.12.1-3.fc30.x86_64

$ dnf versionlock add mutt
Adding versionlock on: mutt-5:1.11.4-1.fc30.*
Adding versionlock on: mutt-5:1.12.1-3.fc30.*

Note:

be careful when adding specific versions 🫣

if you add a package specifying a version with dnf versionlock mutt-5:1.11.4-1.fc30.x86_64 then, if you run dnf versionlock add mutt versionlock will not add mutt-5:1.12.1-3.fc30.x86_64. so yeah. mind the vibe check on that one.

πŸ“ dnf versionlock exclude <package-name-spec>

adds an exclude (within versionlock) for the available packages matching the spec. translation: packages represented by <package-name-spec> will be excluded from transaction operations. bye felicia πŸ‘‹

πŸ’œ dnf versionlock list or dnf versionlock

lists the current versionlock entries. ur current roster, if u will ✨

🧚 dnf versionlock delete <package-name-spec>

removes any matching versionlock entries. it's giving spring cleaning 🧹

🌸 dnf versionlock clear

removes all versionlock entries. scorched earth, no survivors, slay πŸ’…


πŸ’… OPTIONS πŸ’…

all general DNF options are accepted, see Options in dnf(8) for details.

  • --raw β€” do not resolve <package-name-spec> to NEVRAs to find the specific version to lock to. instead <package-name-spec> are used as they are. this enables locking to not yet available versions of the package. for example you may want to keep the bash package on major version 5 and consume any future updates as far as they keep the major version:
$ dnf versionlock add --raw 'bash-5.*'
Adding versionlock on: bash-5.*

πŸŽ€ CONFIGURATION πŸŽ€

/etc/dnf/plugins/versionlock.conf

the minimal content of the conf file should contain main sections with enabled and locklist parameters.

  • locklist β€” this option is a string that points to the file which has the versionlock information in it. note that the file has to exist (or the versionlock plugin will make dnf exit 😭). however, it can be empty. the file takes entries in the format of <package-name-spec> (optionally prefixed with ! for excludes). see Specifying packages in dnf(8) for details.

⭐ NOTES ⭐

a specified package does not have to exist within the available cache of repository data to be considered valid for locking or exclusion. this is by design, to accommodate use cases such as a presently disabled repository. however, a package must exist in the repository cache when the add or exclude subcommands are invoked for it. iykyk πŸ”₯


🫢 Author 🫢

See AUTHORS in your Core DNF Plugins distribution.

2014, Red Hat, Licensed under GPLv2+


and that's the whole page bestie!! 🌈 this was yum-versionlock from dnf-plugins-core, version 4.10.1, dated Sep 27, 2025 β€” go forth and lock ur versions, ur doing amazing, periodt πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from