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 bepackage,patch,pattern,productandsrcpackage. by default all types match.case_sensitiveβ controls whether strings are matched case sensitive. the values aretrue,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 areinstalled,not-installedandall. if more install statuses are specified then the last one is used. the values areinstalledfor all packages which are installed,non-installedfor packages which can be installed or reinstalled, andallfor both. the default isall.match_typeβ the type of string matching in values. does not affecttypeandrepo, which must be specified exactly (no wiggle room, they're the strict parents fr). the values areexact,substring,regexfor regular expressions,globfor matching as on the command line, andword. the default issubstring.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-2solvable_nameβ name of object (e.g.zypper)solvable_summaryβ summary of objectsolvable_archβ architecture of object (e.g.x86_64,i586)solvable_descriptionβ description of objectsolvable_eulaβ license text of objects which request accepting license by usersolvable_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
- arch rolling: libzypp 17.38.17-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms