Debian Codegraph @

upstream/debian-unstable/man8/dnf4-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 "DNF4-VERSIONLOCK" "8" "Sep 27, 2025" "4.10.1" "dnf-plugins-core"
31 .SH NAME
32 dnf4-versionlock \- DNF versionlock Plugin
33 .SH DESCRIPTION
34 .sp
35 \fIversionlock\fP is a plugin that takes a set of names and versions for packages and
36 excludes all other versions of those packages. This allows you to protect
37 packages from being updated by newer versions. Alternately, it accepts a specific
38 package version to exclude from updates, e.g. for when it’s necessary to skip a
39 specific release of a package that has known issues.
40 .sp
41 The plugin provides a command \fIversionlock\fP which allows you to view and edit the
42 list of locked packages easily.
43 .sp
44 The plugin will walk each line of the versionlock file, and parse out the name and
45 version of the package. It will then exclude any package by that name that
46 doesn’t match one of the versions listed within the file. This is basically
47 the same as using \fIdnf –exclude\fP for the package name itself (as you cannot exclude
48 installed packages), but dnf will still see the versions you have
49 installed/versionlocked as available so that \fIdnf reinstall\fP will still
50 work, etc.
51 .sp
52 It can also work in the opposite way, like a fast exclude, by prefixing a ‘!’
53 character to the version recorded in the lock list file. This specifically
54 excludes a package that matches the version exactly.
55 .sp
56 Note the versionlock plugin does not apply any excludes in non\-transactional
57 operations like \fIrepoquery\fP, \fIlist\fP, \fIinfo\fP, etc.
58 .SH SYNOPSIS
59 .sp
60 \fBdnf versionlock [options] [add|exclude|list|delete|clear] [<package\-name\-spec>]\fP
61 .SH ARGUMENTS
62 .INDENT 0.0
63 .TP
64 .B \fB<package\-name\-spec>\fP
65 Package spec to lock or exclude.
66 .UNINDENT
67 .SH SUBCOMMANDS
68 .INDENT 0.0
69 .TP
70 .B \fBdnf versionlock add <package\-name\-spec>\fP
71 Add a versionlock for all available packages matching the spec. It means that only versions of
72 packages represented by \fB<package\-name\-spec>\fP will be available for transaction operations.
73 Each \fB<package\-name\-spec>\fP is converted to concrete NEVRAs which are used for locking. The NEVRAs to lock to are first searched among installed packages and then (if none is found) in all currently available packages.
74 .sp
75 Examples:
76 .INDENT 7.0
77 .INDENT 3.5
78 .sp
79 .EX
80 Locking a package to the version installed:
81
82 $ dnf repoquery \-\-installed bash
83 bash\-0:5.0.7\-1.fc30.x86_64
84
85 $ dnf repoquery bash
86 bash\-0:5.0.2\-1.fc30.i686
87 bash\-0:5.0.2\-1.fc30.x86_64
88 bash\-0:5.0.7\-1.fc30.i686
89 bash\-0:5.0.7\-1.fc30.x86_64
90
91 $ dnf versionlock add bash
92 Adding versionlock on: bash\-0:5.0.7\-1.fc30.*
93
94 Locking not installed package to any of available versions:
95
96 $ dnf repoquery \-\-installed mutt
97
98 $ dnf repoquery mutt
99 mutt\-5:1.11.4\-1.fc30.x86_64
100 mutt\-5:1.12.1\-3.fc30.x86_64
101
102 $ dnf versionlock add mutt
103 Adding versionlock on: mutt\-5:1.11.4\-1.fc30.*
104 Adding versionlock on: mutt\-5:1.12.1\-3.fc30.*
105 .EE
106 .UNINDENT
107 .UNINDENT
108 .sp
109 \fBNOTE:\fP
110 .INDENT 7.0
111 .INDENT 3.5
112 Be careful when adding specific versions
113 .sp
114 If you add a package specifying a version with \fBdnf versionlock mutt\-5:1.11.4\-1.fc30.x86_64\fP then, if you run \fBdnf versionlock add mutt\fP
115 versionlock will not add \fBmutt\-5:1.12.1\-3.fc30.x86_64\fP\&.
116 .UNINDENT
117 .UNINDENT
118 .TP
119 .B \fBdnf versionlock exclude <package\-name\-spec>\fP
120 Add an exclude (within versionlock) for the available packages matching the spec. It means that
121 packages represented by \fB<package\-name\-spec>\fP will be excluded from transaction operations.
122 .TP
123 .B \fBdnf versionlock list\fP or \fBdnf versionlock\fP
124 List the current versionlock entries.
125 .TP
126 .B \fBdnf versionlock delete <package\-name\-spec>\fP
127 Remove any matching versionlock entries.
128 .TP
129 .B \fBdnf versionlock clear\fP
130 Remove all versionlock entries.
131 .UNINDENT
132 .SH OPTIONS
133 .sp
134 All general DNF options are accepted, see \fIOptions\fP in \fBdnf(8)\fP for details.
135 .INDENT 0.0
136 .TP
137 .B \fB\-\-raw\fP
138 Do not resolve \fB<package\-name\-spec>\fP to NEVRAs to find specific version to lock to. Instead \fB<package\-name\-spec>\fP are used as they are. This enables locking to not yet available versions of the package.
139 For example you may want to keep the \fIbash\fP package on major version 5 and consume any future updates as far as they keep the major version:
140 .INDENT 7.0
141 .INDENT 3.5
142 .sp
143 .EX
144 $ dnf versionlock add \-\-raw \(aqbash\-5.*\(aq
145 Adding versionlock on: bash\-5.*
146 .EE
147 .UNINDENT
148 .UNINDENT
149 .UNINDENT
150 .SH CONFIGURATION
151 .sp
152 \fB/etc/dnf/plugins/versionlock.conf\fP
153 .sp
154 The minimal content of conf file should contain \fBmain\fP sections with \fBenabled\fP and
155 \fBlocklist\fP parameters.
156 .INDENT 0.0
157 .TP
158 .B \fBlocklist\fP
159 This option is a string that points to the file which has the versionlock
160 information in it. Note that the file has to exist (or the versionlock plugin
161 will make dnf exit). However, it can be empty.
162 .sp
163 The file takes entries in the format of \fB<package\-name\-spec>\fP (optionally prefixed with ‘!’ for
164 excludes).
165 See \fISpecifying packages\fP in \fBdnf(8)\fP for details.
166 .UNINDENT
167 .SH NOTES
168 .sp
169 A specified package does not have to exist within the available cache of repository data
170 to be considered valid for locking or exclusion. This is by design, to accommodate use
171 cases such as a presently disabled repository. However, a package must exist in the
172 repository cache when the \fBadd\fP or \fBexclude\fP subcommands are invoked for it.
173 .SH AUTHOR
174 See AUTHORS in your Core DNF Plugins distribution
175 .SH COPYRIGHT
176 2014, Red Hat, Licensed under GPLv2+
177 .\" Generated by docutils manpage writer.
178 .