LOCKS(5)

πŸ’… locks(5) β€” the libzypp locking file, explained by your fav Unix bestie

ok so first things first: this is locks(5), a section-5 manpage from LIBZYPP (yes the zypper girlies' library), and it's literally just about one file that tells libzypp "hands off, don't touch these packages." manifesting clarity for you rn πŸ¦‹


✨ NAME ✨

locks β€” the libzypp locking file. that's it. that's the whole name. iconic brevity.


πŸŽ€ DESCRIPTION πŸŽ€

okay so bestie, here's the tea: the file /etc/zypp/locks gets read by libzypp at start-up, but only if zypp.conf allows it. like, it needs permission first, we love boundaries πŸ’…

the entries in it are used for the initial locking of packages, and locking a package means not allowing to install or uninstall it. periodt. it's locked, it stays exactly where it is.

valid entries are of the form:

attribute: value

where the attributes and their values are described down below πŸ‘‡

and β€” super important β€” locks are separated by empty lines. one blank line between each lock, don't forget it or the whole vibe collapses 😭


✨ ATTRIBUTES ✨

quick housekeeping note: all attributes are lower-case. lowercase girlies only, no cap.

  • repo β€” specifies repository restriction. only the alias is accepted, nothing else. by default all repositories match.
  • type β€” resolvable type restriction. the values can be package, patch, pattern, product and srcpackage. by default all types match.
  • case_sensitive β€” controls whether strings are matched case sensitive. the values are true, false, on, off. the default is case insensitive (so it's out here not caring about your CAPS LOCK energy).
  • install_status β€” the status of the object. possible states are installed, not-installed and all. if more install statuses are specified then the last one is used. the values are installed for all packages which are installed, non-installed for packages which can be installed or reinstalled, and all for both. the default is all.
  • match_type β€” the type of string matching in values. does not affect type and repo, which must be specified exactly (no wiggle room, they're the strict parents fr). the values are exact, substring, regex for regular expressions, glob for matching as on the command line, and word. the default is substring.
  • query_string β€” a string to be matched in multiple attributes. it should be restricted by another attribute with an empty value β€” and yes that's a recommendation, because without restriction expect some performance problems 🐌 (not me warning you twice, ok).
  • version β€” restricts the lock only to some versions. it contains two parts: an optional operator and the version. the operator is ==, !=, <, >, <=, >=. if the operator is not specified then == is used. the version has the format [epoch:]version[-release]. example: version: < 0:0.11.4-2
  • solvable_name β€” name of object (e.g. zypper)
  • solvable_summary β€” summary of object
  • solvable_arch β€” architecture of object (e.g. x86_64, i586)
  • solvable_description β€” description of object
  • solvable_eula β€” license text of objects which request accepting license by user
  • solvable_license β€” license of package (only for package) (e.g. GPL2)
  • solvable_keywords β€” keywords which specify package (only for package)
  • solvable_authors β€” authors of package (only for package)
  • solvable_group β€” package group (only for package) (e.g. Development/Tools/Version Control)
  • update_reference_type β€” reference for update (e.g. bugzilla, cve) (only for patches)

🌸 EXAMPLES 🌸

these are the moments, bestie. study them like they're going on the exam 🫢

πŸ“ Exact Package

this is the way YaST UI does it. lock k3b β€” like, e.g. you don't want to update it, it's perfect as it is, leave her alone.

-----locks-----
type: package
solvable_name: k3b
match_type: exact
case_sensitive: on

πŸ¦‹ Package Wildcard

this is the way zypper addlock cross-*-gcc-icecream-backend does it. glob matching said "I'll handle this one."

-----locks-----
type: package
solvable_name: cross-*-gcc-icecream-backend
match_type: glob
case_sensitive: on

⭐ Versioned Lock

do not install new GCC. this format is used when converting from the openSUSE-10.3 lock format β€” a little throwback moment, we love continuity πŸ’œ

-----locks-----
solvable_name: gcc
match_type: glob
version: > 4.2

🧚 Anything named KDE

locks everything which contains kde in the name.

-----locks-----
solvable_name: kde

πŸ‘‘ Anything mentioning KDE

locks everything which contains kde in the name, summary, or description. she's thorough.

-----locks-----
query_string: kde
solvable_name:
solvable_summary:
solvable_description:

(note those empty values on the last three β€” that's the restriction thing from query_string doing its job, iykyk)


🌈 HOMEPAGE 🌈

this manual page only covers the most important attributes, bestie. the complete list is available at http://en.opensuse.org/Libzypp/Locksfile β€” go treat yourself to the full lore.


πŸ’– AUTHORS πŸ’–

Josef Reidinger jreidinger@suse.cz β€” manual page contributions by Martin Vidner mvidner@suse.cz. legends, both of them πŸ™Œ


πŸŽ€ SEE ALSO πŸŽ€

zypper(8) β€” go read that one next, it's giving main character energy ✨


ok that's the whole page!! no gatekeeping, you now know more about /etc/zypp/locks than most people ever will. slay πŸ’…

πŸ’– this page came to you courtesy of SUSE Linux, dated 2026-10-27, and it's the LOCKS(5) page from LIBZYPP β€” go forth and lock responsibly, bestie, ily!! 🫢✨

πŸ“¦ where this page comes from