Debian Codegraph @

upstream/debian-unstable/man8/dnf5-automatic.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-AUTOMATIC" "8" "May 09, 2026" "" "dnf5"
32 .SH NAME
33 dnf5-automatic \- Automatic Command
34 .SH SYNOPSIS
35 .sp
36 \fBdnf5 automatic [options]\fP
37 .SH DESCRIPTION
38 .sp
39 Alternative CLI to \fBdnf upgrade\fP with specific facilities to make it suitable to be executed automatically and regularly from systemd timers, cron jobs and similar.
40 .sp
41 The operation of the tool is controlled by configuration files. Default values are set from \fB/usr/share/dnf5/dnf5\-plugins/automatic.conf\fP config file. Host\-specific overrides from \fB/etc/dnf/automatic.conf\fP are then applied.
42 .sp
43 The tool synchronizes package metadata as needed and then checks for updates available for the given system and then either exits, downloads the packages or downloads and applies the updates. The outcome of the operation is then reported by a selected mechanism, for instance via the standard output, email or MOTD messages.
44 .sp
45 The systemd timer unit \fBdnf5\-automatic.timer\fP will behave as the configuration file specifies (see below) with regard to whether to download and apply updates.
46 .SH OPTIONS
47 .INDENT 0.0
48 .TP
49 .B \fB\-\-timer\fP
50 .nf
51 Apply random delay before execution.
52 .fi
53 .sp
54 .UNINDENT
55 .sp
56 The following options can be used to override values from the configuration file.
57 .INDENT 0.0
58 .TP
59 .B \fB\-\-downloadupdates\fP
60 .nf
61 Automatically download updated packages.
62 .fi
63 .sp
64 .TP
65 .B \fB\-\-no\-downloadupdates\fP
66 .nf
67 Do not automatically download updated packages.
68 .fi
69 .sp
70 .TP
71 .B \fB\-\-installupdates\fP
72 .nf
73 Automatically install downloaded updates (implies \-\-downloadupdates).
74 .fi
75 .sp
76 .TP
77 .B \fB\-\-no\-installupdates\fP
78 .nf
79 Do not automatically install downloaded updates.
80 .fi
81 .sp
82 .UNINDENT
83 .SH RUN DNF5 AUTOMATIC SERVICE
84 .sp
85 The service is typically executed using the systemd timer \fBdnf5\-automatic.timer\fP\&. To configure the service, customize the \fB/etc/dnf/automatic.conf\fP file. You can either copy the distribution config file from \fB/usr/share/dnf5/dnf5\-plugins/automatic.conf\fP and use it as a baseline, or create your own configuration file from scratch with only the required overrides.
86 .sp
87 Then enable the timer unit:
88 .sp
89 \fBsystemctl enable \-\-now dnf5\-automatic.timer\fP
90 .SH CONFIGURATION FILE FORMAT
91 .sp
92 The configuration file is separated into topical sections.
93 .SS \fB[commands]\fP section
94 .sp
95 Setting the mode of operation of the program.
96 .INDENT 0.0
97 .TP
98 .B \fBapply_updates\fP
99 boolean, default: False
100 .sp
101 Whether packages comprising the available updates should be applied by \fBdnf5\-automatic.timer\fP, i.e. installed via RPM. Implies \fBdownload_updates\fP\&. Note that if this is set to \fBFalse\fP, downloaded packages will be left in the cache till the next successful DNF transaction.
102 .TP
103 .B \fBdownload_updates\fP
104 boolean, default: True
105 .sp
106 Whether packages comprising the available updates should be downloaded by \fBdnf5\-automatic.timer\fP\&.
107 .TP
108 .B \fBnetwork_online_timeout\fP
109 time in seconds, default: 60
110 .sp
111 Maximal time \fBdnf5 automatic\fP will wait until the system is online. 0 means that network availability detection will be skipped.
112 .TP
113 .B \fBrandom_sleep\fP
114 time in seconds, default: 0
115 .sp
116 Maximal random delay before downloading (only applied if \fB\-\-timer\fP option was used). Note that, by default, the \fBsystemd\fP timers also apply a random delay of up to 1 hour.
117 .UNINDENT
118 .INDENT 0.0
119 .TP
120 .B \fBupgrade_type\fP
121 either one of \fBdefault\fP, \fBsecurity\fP, default: \fBdefault\fP
122 .sp
123 What kind of upgrades to look at. \fBdefault\fP signals looking for all available updates, \fBsecurity\fP only those with an issued security advisory.
124 .TP
125 .B \fBreboot\fP
126 either one of \fBnever\fP, \fBwhen\-changed\fP, \fBwhen\-needed\fP, default: \fBnever\fP
127 .sp
128 When the system should reboot following upgrades. \fBnever\fP does not reboot the system. \fBwhen\-changed\fP triggers a reboot after any upgrade. \fBwhen\-needed\fP triggers a reboot only when rebooting is necessary to apply changes, such as when systemd or the kernel is upgraded.
129 .TP
130 .B \fBreboot_command\fP
131 string, default: \fBshutdown \-r +5 \(aqRebooting after applying package updates\(aq\fP
132 .sp
133 Specify the command to run to trigger a reboot of the system. For example, to skip the 5\-minute delay and wall message, use \fBshutdown \-r\fP
134 .UNINDENT
135 .SS \fB[emitters]\fP section
136 .sp
137 Choosing how the results should be reported.
138 .INDENT 0.0
139 .TP
140 .B \fBemit_via\fP
141 list, default: \fBstdio\fP
142 .sp
143 List of emitters to report the results through. Available emitters are \fBstdio\fP to print the result to standard output, \fBcommand\fP to send the result to a custom command, \fBcommand_email\fP to send an email using a command, \fBemail\fP to send the report via email using SMTP server (see \fB[email]\fP section for requirements), and \fBmotd\fP sends the result to \fI/etc/motd.d/dnf5\-automatic\fP file.
144 .TP
145 .B \fBsystem_name\fP
146 string, default: hostname of the given system
147 .sp
148 How the system is called in the reports.
149 .TP
150 .B \fBemit_no_updates\fP
151 boolean, default: False
152 .sp
153 Whether to emit a message when nothing interesting happened \- the operation succeeded and no packages were available/installed.
154 .UNINDENT
155 .SS \fB[command]\fP section
156 .sp
157 The command emitter configuration. Variables usable in format string arguments are \fBbody\fP with the message body.
158 .INDENT 0.0
159 .TP
160 .B \fBcommand_format\fP
161 format string, default: \fBcat\fP
162 .sp
163 The shell command to execute.
164 .TP
165 .B \fBstdin_format\fP
166 format string, default: \fB{body}\fP
167 .sp
168 The data to pass to the command on stdin.
169 .UNINDENT
170 .SS \fB[command_email]\fP section
171 .sp
172 The command email emitter configuration. Variables usable in format string arguments are \fBbody\fP with message body, \fBsubject\fP with email subject, \fBemail_from\fP with the \(dqFrom:\(dq address and \fBemail_to\fP with a space\-separated list of recipients.
173 .INDENT 0.0
174 .TP
175 .B \fBcommand_format\fP
176 format string, default: \fBmail \-Ssendwait \-s {subject} \-r {email_from} {email_to}\fP
177 .sp
178 The shell command to execute.
179 .TP
180 .B \fBemail_from\fP
181 string, default: \fBroot\fP
182 .sp
183 Message\(aqs \(dqFrom:\(dq address.
184 .TP
185 .B \fBemail_to\fP
186 list, default: \fBroot\fP
187 .sp
188 List of recipients of the message.
189 .TP
190 .B \fBstdin_format\fP
191 format string, default: \fB{body}\fP
192 .sp
193 The data to pass to the command on stdin.
194 .UNINDENT
195 .SS \fB[email]\fP section
196 .sp
197 The email emitter configuration. This emitter sends messages directly via an SMTP server using \fBlibcurl\fP\&. It requires \fBlibcurl\fP with SMTP protocol support. Some distributions ship a minimal variant of libcurl without SMTP support. On Fedora, this can be resolved by running \fBdnf5 swap libcurl\-minimal libcurl\fP\&. Alternatively, use the \fBcommand_email\fP emitter which does not require SMTP support in libcurl. Credentials for the SMTP server are read from the \fB~/.netrc\fP file.
198 .INDENT 0.0
199 .TP
200 .B \fBemail_from\fP
201 string, default: \fBroot\fP
202 .sp
203 Message\(aqs \(dqFrom:\(dq address.
204 .TP
205 .B \fBemail_to\fP
206 list, default: \fBroot\fP
207 .sp
208 List of recipients of the message.
209 .TP
210 .B \fBemail_host\fP
211 string, default: \fBlocalhost\fP
212 .sp
213 Hostname of the SMTP server used to send the message.
214 .TP
215 .B \fBemail_port\fP
216 integer, default: \fB25\fP
217 .sp
218 Port number to connect to at the SMTP server.
219 .TP
220 .B \fBemail_tls\fP
221 either one of \fBno\fP, \fByes\fP, \fBstarttls\fP, default: \fBno\fP
222 .sp
223 Whether to use TLS, STARTTLS or no encryption to connect to the SMTP server.
224 .UNINDENT
225 .SS \fB[base]\fP section
226 .sp
227 Can be used to override settings from DNF\(aqs main configuration file. See \fBdnf5.conf(5)\fP\&.
228 .SH Author
229 See AUTHORS.md in dnf5 source distribution.
230 .SH Copyright
231 Contributors to the dnf5 project.
232 .\" End of generated man page.