Debian Codegraph @

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