Debian Codegraph @

upstream/debian-unstable/man8/dnf5-config-manager.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-CONFIG-MANAGER" "8" "May 09, 2026" "" "dnf5"
32 .SH NAME
33 dnf5-config-manager \- Config-manager Command
34 .SH SYNOPSIS
35 .sp
36 \fBdnf5 config\-manager <subcommand> [options] [arguments]\fP
37 .SH DESCRIPTION
38 .sp
39 Manages main configuration, repositories configuration, and variables.
40 .SH SUBCOMMANDS
41 .INDENT 0.0
42 .TP
43 .B \fBaddrepo \-\-from\-repofile=REPO_CONFIGURATION_FILE_URL [\-\-create\-missing\-dir] [\-\-overwrite] [\-\-save\-filename=FILENAME]\fP
44 Adds a new repositories configuration file specified by URL or local path.
45 .sp
46 The file is copied without changes. The destination file name can be defined using the \fB\-\-save\-filename\fP option,
47 otherwise it is taken from the source specification. If the \fB\&.repo\fP extension is missing from the destination
48 filename, it will be added.
49 .sp
50 The destination directory path is the first path stored in the \fBreposdir\fP option (by default \fB/etc/yum.repos.d\fP).
51 Overwriting/replacing an existing file can be enabled using the \fB\-\-overwrite\fP option.
52 Before the new repositories configuration file is finally saved, it is analyzed and tested for validity.
53 Repository IDs are also tested. Repositories with the same ID must not be defined in other configuration files.
54 .TP
55 .B \fBaddrepo [\-\-id=REPO_ID] <\-\-set=REPO_OPTION=VALUE>+ [\-\-add\-or\-replace] [\-\-create\-missing\-dir] [\-\-overwrite] [\-\-save\-filename=FILENAME]\fP
56 Adds a new repository defined using user options.
57 .sp
58 At least one of \fB\-\-set=baseurl=<URL>\fP, \fB\-\-set=mirrorlist=<URL>\fP, \fB\-\-set=metalink=<URL>\fP must be set
59 to a non\-empty URL. The repository ID can be defined using the \fB\-\-id\fP option, otherwise it is generated from the URL.
60 The destination file name can be defined using the \fB\-\-save\-filename\fP option, otherwise it is set to the repository ID.
61 If the \fB\&.repo\fP extension is missing from the destination filename, it will be added.
62 .sp
63 The destination directory path is the first path stored in the \fBreposdir\fP option (by default \fB/etc/yum.repos.d\fP).
64 Overwriting/replacing an existing file can be enabled using the \fB\-\-overwrite\fP option.
65 Modifying an existing file can be enabled using the \fB\-\-add\-or\-replace\fP option. Modification means
66 that the new repository is added to the existing file or a repository with the same ID is replaced in the file.
67 Before the new repository configuration is finally saved, the repository ID is tested. A repository
68 with the same ID must not be defined in another configuration file.
69 .TP
70 .B \fBsetopt [\-\-create\-missing\-dir] <[repoid.]option_name=value>+\fP
71 Sets options in the main configuration file and in the repositories configuration override file.
72 .sp
73 The main configuration is read first from the files in the drop\-in directories and then from the main configuration
74 file (by default \fB/etc/dnf/dnf.conf\fP). So, options from main configuration file are read last and override
75 the values of the same options defined in the drop\-in directories.
76 .sp
77 The repositories configuration is read from the repository configuration files and then adjusted using repository
78 configuration overrides. Repository configuration override files are read from the distribution repository override
79 directory (\fB/usr/share/dnf5/repos.override.d\fP) and from the system repository override directory
80 (\fB/etc/dnf/repos.override.d\fP). If a file with the same name is present in both override directories,
81 only the file from the system override directory is used. Thus, the distribution override file can simply be masked
82 by creating a file with the same name in the system override directory. All used override files are sorted
83 alphabetically by their names and then applied in that order. The override from the next file overwrites
84 the previous one\-\-\-the last override wins.
85 .sp
86 The \fBsetopt\fP command writes the repositories configuration overrides to a file named \fB99\-config_manager.repo\fP
87 located in the system repository override directory. Repository settings are written only to this override file.
88 The original repository configuration file is not changed. Repository ID may contain globs.
89 Override files also support globs. But the \fBsetopt\fP command resolves the \fBrepoid\fP pattern, and overrides are set
90 for each matching repository independently. This means repositories added later will not be affected by these overrides.
91 .TP
92 .B \fBunsetopt <[repoid.]option_name>+\fP
93 Removes options from the main configuration file and from the repositories configuration override file.
94 .sp
95 The \fBunsetopt\fP command removes options from the main configuration file (by default \fB/etc/dnf/dnf.conf\fP).
96 However, the options may be still defined in configuration files in drop\-in directories (for example,
97 the default distribution configuration).
98 .sp
99 The \fBunsetopt\fP command removes repository configuration overrides from the file named \fB99\-config_manager.repo\fP
100 located in the system repository override directory. However, the overrides may be still defined in other repository
101 override files (for example, the default distribution overrides). Empty sections are removed from the configuration
102 override file. Repository ID may contain globs. In this case, the \fBrepoid\fP pattern is resolved and the override
103 is removed from all matching sections.
104 .TP
105 .B \fBsetvar [\-\-create\-missing\-dir] <variable_name=value>+\fP
106 Sets one or more variables.
107 .sp
108 Variables are loaded from multiple directories. The list of directory paths is taken from the \fBvarsdir\fP option.
109 The \fBsetvar\fP command stores variables to the last directory in the list (by default \fB/etc/dnf/vars\fP).
110 Variables from this directory are read last and override the values of the same variables defined in previous
111 directories. In other words, the last directory has the highest priority.
112 .sp
113 Note:
114 The variables \fBreleasever_major\fP and \fBreleasever_minor\fP are automatically derived from the \fBreleasever\fP variable whenever it is set.
115 .TP
116 .B \fBunsetvar <variable>+\fP
117 Removes variables.
118 .sp
119 Variables are loaded from multiple directories. The list of directory paths is taken from the \fBvarsdir\fP option.
120 The \fBunsetvar\fP command removes variables from the last directory in the list (by default \fB/etc/dnf/vars\fP).
121 So, the variable may still exist in another directory in the list (for example, the default distribution value).
122 .TP
123 .B \fBenable [\-\-create\-missing\-dir] <repoid>+\fP
124 Enables one or more repositories.
125 .sp
126 The \fBenable\fP command enables the repositories via a file named \fB99\-config_manager.repo\fP located in the system
127 repository override directory. The original repository configuration file is not changed. Repository ID may contain
128 globs. \fBenable\fP command resolves the \fBrepoid\fP pattern, and each matching repository is enabled independently.
129 This means repositories added later will not be affected by this command.
130 .TP
131 .B \fBdisable [\-\-create\-missing\-dir] <repoid>+\fP
132 Disables one or more repositories.
133 .sp
134 The \fBdisable\fP command disables the repositories via a file named \fB99\-config_manager.repo\fP located in the system
135 repository override directory. The original repository configuration file is not changed. Repository ID may contain
136 globs. \fBdisable\fP command resolves the \fBrepoid\fP pattern, and each matching repository is disabled independently.
137 This means repositories added later will not be affected by this command.
138 .UNINDENT
139 .sp
140 \fBNote:\fP
141 .INDENT 0.0
142 .INDENT 3.5
143 Override directories are also listed with examples in Drop\-in repo directories \%<#\:drop-in-repo-directories-label>\&.
144 .UNINDENT
145 .UNINDENT
146 .SH OPTIONS
147 .INDENT 0.0
148 .TP
149 .B \fB\-\-add\-or\-replace\fP
150 Allow adding or replacing the repository with the same ID in the existing configuration file.
151 .TP
152 .B \fB\-\-create\-missing\-dir\fP
153 Allow creation of missing directories.
154 .TP
155 .B \fB\-\-from\-repofile=REPO_CONFIGURATION_FILE_URL\fP
156 Specifies the source configuration file with the new repositories.
157 .TP
158 .B \fB\-\-id=REPO_ID\fP
159 Set ID for newly created repository.
160 .TP
161 .B \fB\-\-overwrite\fP
162 Allow replacing the existing repository configuration file by new one.
163 .TP
164 .B \fB\-\-save\-filename=FILENAME\fP
165 Set the name of the new repository configuration file. The \fB\&.repo\fP extension is added if it is missing.
166 .TP
167 .B \fB\-\-set=REPO_OPTION=VALUE\fP
168 Set option in newly created repository.
169 .UNINDENT
170 .SH EXAMPLES
171 .INDENT 0.0
172 .TP
173 .B \fBdnf5 config\-manager addrepo \-\-from\-repofile=http://example.com/some/additional.repo\fP
174 Download \fBadditional.repo\fP, test it, and put it in repository configuration directory.
175 .TP
176 .B \fBdnf5 config\-manager addrepo \-\-set=baseurl=http://example.com/different/repo\fP
177 Create new repo file with \fBhttp://example.com/different/repo\fP as \fBbaseurl\fP and enable it. The repository ID and target file name is generated from \fBbaseurl\fP\&.
178 .TP
179 .B \fBdnf5 config\-manager addrepo \-\-set=baseurl=http://example.com/different/rep \-\-id=example \-\-set=enabled=0\fP
180 Create new repo file with \fBhttp://example.com/different/repo\fP as \fBbaseurl\fP\&. Set repository ID to \fBexample\fP and disable it.
181 .TP
182 .B \fBdnf5 config\-manager setopt repoid1.enabled=1 repoid2.enabled=0\fP
183 Sets override to enable repository identified by \fBrepoid1\fP and disable repository identified by \fBrepoid2\fP\&.
184 .TP
185 .B \fBdnf5 config\-manager setopt repo1.proxy=http://proxy.example.com:3128/ repo2.proxy=http://proxy.example.com:3128/\fP
186 Sets override for \fBproxy\fP option in repositories with repository IDs \fBrepo1\fP and \fBrepo2\fP\&.
187 .TP
188 .B \fBdnf5 config\-manager setopt \(aq*\-debuginfo.pkg_gpgcheck=0\(aq\fP
189 Sets override for the \fBpkg_gpgcheck\fP option in all repositories whose repository ID ends with \fB\-debuginfo\fP\&.
190 .TP
191 .B \fBdnf5 config\-manager unsetopt \(aq*\-debuginfo.pkg_gpgcheck\(aq\fP
192 Remove override for the \fBpkg_gpgcheck\fP option in all repositories whose repository ID ends with \fB\-debuginfo\fP\&.
193 .TP
194 .B \fBdnf5 config\-manager setopt keepcache=1 log_size=10M\fP
195 Enables the \fBkeepcache\fP main option and sets the maximum size of logger files to 10 mebibytes (10 * 1024 * 1024 bytes).
196 .TP
197 .B \fBdnf5 config\-manager unsetopt keepcache log_size\fP
198 Removes \fBkeepcache\fP and \fBlog_size\fP from the main configuration file.
199 .TP
200 .B \fBdnf5 config\-manager setvar \-\-create\-missing\-dir myvar1=value1 myvar2=value2\fP
201 Sets the variables \fBmyvar1\fP and \fBmyvar2\fP\&. Directory for the variables is created if it does not exist.
202 .TP
203 .B \fBdnf5 config\-manager unsetvar myvar1 myvar2\fP
204 Removes \fBmyvar1\fP and \fBmyvar2\fP variables.
205 .UNINDENT
206 .SH SEE ALSO
207 .INDENT 0.0
208 .TP
209 .B Configuration:
210 .nf
211 \fBdnf5.conf(5)\fP, DNF5 Configuration Reference \%<#\:dnf5-conf-label>
212 .fi
213 .sp
214 .UNINDENT
215 .SH Author
216 See AUTHORS.md in dnf5 source distribution.
217 .SH Copyright
218 Contributors to the dnf5 project.
219 .\" End of generated man page.