Debian Codegraph @

upstream/debian-unstable/man8/dnf5-versionlock.8

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