Debian Codegraph @

upstream/mageia-cauldron/man8/dnf5-versionlock.8

raw
1 .\" Man page generated from reStructuredText.
2 .
3 .
4 .nr rst2man-indent-level 0
5 .
6 .de1 rstReportMargin
7 \\$1 \\n[an-margin]
8 level \\n[rst2man-indent-level]
9 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
10 -
11 \\n[rst2man-indent0]
12 \\n[rst2man-indent1]
13 \\n[rst2man-indent2]
14 ..
15 .de1 INDENT
16 .\" .rstReportMargin pre:
17 . RS \\$1
18 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
19 . nr rst2man-indent-level +1
20 .\" .rstReportMargin post:
21 ..
22 .de UNINDENT
23 . RE
24 .\" indent \\n[an-margin]
25 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
26 .nr rst2man-indent-level -1
27 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
28 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
29 ..
30 .TH "DNF5-VERSIONLOCK" "8" "May 10, 2026" "" "dnf5"
31 .SH NAME
32 dnf5-versionlock \- Versionlock Command
33 .SH SYNOPSIS
34 .sp
35 \fBdnf5 versionlock <subcommand> <package\-spec\-N>...\fP
36 .SH DESCRIPTION
37 .sp
38 The \fBversionlock\fP command in \fBDNF5\fP takes a set of names and versions for
39 packages and excludes all other versions of those packages. This allows you to
40 protect packages from being updated by newer versions. Alternately, it accepts
41 a specific package version to exclude from updates, e.g. for when it\(aqs
42 necessary to skip a specific release of a package that has known issues.
43 .sp
44 The plugin will walk each entry of the versionlock file, and exclude any
45 package of given name that doesn\(aqt match conditions listed within the file.
46 This is basically the same as using \fIdnf5 \-\-exclude\fP for the package name itself
47 (as you cannot exclude installed packages), but dnf will still see the versions
48 you have installed/versionlocked as available so that \fIdnf reinstall\fP will
49 still work.
50 .sp
51 Note the versionlock command does not apply any excludes in non\-transactional
52 operations like \fIrepoquery\fP, \fIlist\fP, \fIinfo\fP, etc.
53 .SH SUBCOMMANDS
54 .INDENT 0.0
55 .TP
56 .B \fBadd\fP
57 .nf
58 Add a versionlock for all available packages matching the spec. It means that only versions of packages represented by \fBpackage\-spec\-N\fP are available for transaction operations. The NEVRAs to lock to are first searched among installed packages and then (if none is found) in all currently available packages.
59 .fi
60 .sp
61 .TP
62 .B \fBexclude\fP
63 .nf
64 Add an exclude (within versionlock) for the available packages matching the spec. It means that packages represented by \fBpackage\-spec\-N\fP will be excluded from transaction operations.
65 .fi
66 .sp
67 .TP
68 .B \fBclear\fP
69 .nf
70 Remove all versionlock entries.
71 .fi
72 .sp
73 .TP
74 .B \fBdelete\fP
75 .nf
76 Remove any matching versionlock entries.
77 .fi
78 .sp
79 .TP
80 .B \fBlist\fP
81 .nf
82 List the current versionlock entries.
83 .fi
84 .sp
85 .UNINDENT
86 .SH EXAMPLES
87 .INDENT 0.0
88 .TP
89 .B \fBdnf5 versionlock add acpi\fP
90 .nf
91 If acpi package is installed, lock it to currently installed version. If it\(aqs not installed, lock acpi to any of currently available versions.
92 .fi
93 .sp
94 .TP
95 .B \fBdnf5 versionlock list\fP
96 .nf
97 Show current versionlock configuration.
98 .fi
99 .sp
100 .TP
101 .B \fBdnf5 versionlock delete acpi\fP
102 .nf
103 Remove any rules for acpi package.
104 .fi
105 .sp
106 .TP
107 .B \fBdnf5 versionlock exclude iftop\-1.2.3\-7.fc38\fP
108 .nf
109 Exclude iftop\-1.2.3\-7.fc38 release.
110 .fi
111 .sp
112 .UNINDENT
113 .SH VERSIONLOCK FILE FORMAT
114 .sp
115 The versionlock file is a TOML file stored in location \fI/etc/dnf/versionlock.toml\fP\&.
116 The file must contain the \fIversion\fP key, currently supported version is \fI1.0\fP\&.
117 Then it contains \fIpackages\fP \- a list of locking entries. Each entry consist of the package name and a list of conditions. The package name specification supports the same glob pattern matching as the shell. All the conditions must be true for a package to match (they are combined using logical AND). All entries are then combined together using logical OR operation.
118 .SS Example of versionlock file
119 .INDENT 0.0
120 .INDENT 3.5
121 .sp
122 .EX
123 version = \(dq1.0\(dq
124
125 # keep package bash on version 0:5.2.15\-5.fc39
126 [[packages]]
127 name = \(dqbash\(dq # name of the package
128 comment = \(dqdescription\(dq # optional description of the entry
129 [[packages.conditions]] # conditions for the package \(dqbash\(dq
130 key = \(dqevr\(dq # epoch, evr, and arch keys are supported
131 comparator = \(dq=\(dq # <, <=, =, >=, >, and != operators are supported
132 value = \(dq0:5.2.15\-5.fc39\(dq # pattern to match
133
134 # exclude iftop\-1.2.3\-7.fc38 version (versionlock exclude iftop\-1.2.3\-7.fc38)
135 [[packages]]
136 name = \(dqiftop\(dq
137 [[packages.conditions]]
138 key = \(dqevr\(dq
139 comparator = \(dq!=\(dq
140 value = \(dq0:1.0\-0.31.pre4.fc39\(dq
141
142 # keep acpi on major version 3
143 [[packages]]
144 name = \(dqacpi\(dq
145 [[packages.conditions]]
146 key = \(dqevr\(dq
147 comparator = \(dq<\(dq
148 value = \(dq4\(dq
149 [[packages.conditions]]
150 key = \(dqevr\(dq
151 comparator = \(dq>=\(dq
152 value = \(dq3\(dq
153
154 # keep all *nvidia* packages on version 3:570.*
155 [[packages]]
156 name = \(dq*nvidia*\(dq
157 [[packages.conditions]]
158 key = \(dqevr\(dq
159 comparator = \(dq>=\(dq
160 value = \(dq3:570\(dq
161 [[packages.conditions]]
162 key = \(dqevr\(dq
163 comparator = \(dq<\(dq
164 value = \(dq3:571\(dq
165 .EE
166 .UNINDENT
167 .UNINDENT
168 .SH SEE ALSO
169 .INDENT 0.0
170 .INDENT 3.5
171 .nf
172 \fBdnf5\-specs(7)\fP, \fI\%Patterns specification\fP
173 .fi
174 .sp
175 .UNINDENT
176 .UNINDENT
177 .SH AUTHOR
178 See AUTHORS.md in dnf5 source distribution.
179 .SH COPYRIGHT
180 Contributors to the dnf5 project.
181 .\" Generated by docutils manpage writer.
182 .