| 1 |
<?xml version='1.0'?> <!--*-nxml-*--> |
| 2 |
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" |
| 3 |
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> |
| 4 |
<!-- SPDX-License-Identifier: LGPL-2.1-or-later --> |
| 5 |
|
| 6 |
<refentry id="updatectl" conditional='ENABLE_SYSUPDATED' |
| 7 |
xmlns:xi="http://www.w3.org/2001/XInclude"> |
| 8 |
|
| 9 |
<refentryinfo> |
| 10 |
<title>updatectl</title> |
| 11 |
<productname>systemd</productname> |
| 12 |
</refentryinfo> |
| 13 |
|
| 14 |
<refmeta> |
| 15 |
<refentrytitle>updatectl</refentrytitle> |
| 16 |
<manvolnum>1</manvolnum> |
| 17 |
</refmeta> |
| 18 |
|
| 19 |
<refnamediv> |
| 20 |
<refname>updatectl</refname> |
| 21 |
<refpurpose>Control the system update service</refpurpose> |
| 22 |
</refnamediv> |
| 23 |
|
| 24 |
<refsynopsisdiv> |
| 25 |
<cmdsynopsis> |
| 26 |
<command>updatectl</command> |
| 27 |
<arg choice="opt" rep="repeat">OPTIONS</arg> |
| 28 |
<arg choice="req">COMMAND</arg> |
| 29 |
<arg choice="opt" rep="repeat">TARGET</arg> |
| 30 |
</cmdsynopsis> |
| 31 |
</refsynopsisdiv> |
| 32 |
|
| 33 |
<refsect1> |
| 34 |
<title>Description</title> |
| 35 |
|
| 36 |
<para><command>updatectl</command> may be used to check for and install system updates managed by |
| 37 |
<citerefentry><refentrytitle>systemd-sysupdated.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. |
| 38 |
</para> |
| 39 |
</refsect1> |
| 40 |
|
| 41 |
<refsect1> |
| 42 |
<title>Commands</title> |
| 43 |
|
| 44 |
<para>The following commands are understood:</para> |
| 45 |
|
| 46 |
<variablelist> |
| 47 |
<varlistentry> |
| 48 |
<term><command>list</command> [<replaceable>TARGET</replaceable>[@<replaceable>VERSION</replaceable>]]</term> |
| 49 |
|
| 50 |
<listitem><para>Show information about targets and their versions.</para> |
| 51 |
|
| 52 |
<para>When no <replaceable>TARGET</replaceable> is specified, this command lists all |
| 53 |
available targets. When a <replaceable>TARGET</replaceable> is specified without a |
| 54 |
<replaceable>VERSION</replaceable>, this command lists all known versions of the |
| 55 |
specified target. If a <replaceable>VERSION</replaceable> is specified, this command |
| 56 |
lists all known information about the specific version.</para> |
| 57 |
|
| 58 |
<para>See the example below for details of the output.</para> |
| 59 |
|
| 60 |
<xi:include href="version-info.xml" xpointer="v257"/></listitem> |
| 61 |
</varlistentry> |
| 62 |
|
| 63 |
<varlistentry> |
| 64 |
<term><command>check</command> [<replaceable>TARGET</replaceable>…]</term> |
| 65 |
|
| 66 |
<listitem><para>Check if any updates are available for the specified targets. If no targets |
| 67 |
are specified, all available targets will be checked for updates.</para> |
| 68 |
|
| 69 |
<para>See the example below for details of the output.</para> |
| 70 |
|
| 71 |
<xi:include href="version-info.xml" xpointer="v257"/></listitem> |
| 72 |
</varlistentry> |
| 73 |
|
| 74 |
<varlistentry> |
| 75 |
<term><command>update</command> [<replaceable>TARGET</replaceable>[@<replaceable>VERSION</replaceable>]…]</term> |
| 76 |
|
| 77 |
<listitem><para>Update the specified targets to the specified versions. If a target |
| 78 |
is specified without a version, then it will be updated to the latest version. If no targets are |
| 79 |
specified, then all available targets will be updated to the latest version.</para> |
| 80 |
|
| 81 |
<xi:include href="version-info.xml" xpointer="v257"/></listitem> |
| 82 |
</varlistentry> |
| 83 |
|
| 84 |
<varlistentry> |
| 85 |
<term><command>vacuum</command> [<replaceable>TARGET</replaceable>…]</term> |
| 86 |
|
| 87 |
<listitem><para>Clean up old versions of the specified targets. If no targets are specified, |
| 88 |
all available targets will be vacuumed.</para> |
| 89 |
|
| 90 |
<xi:include href="version-info.xml" xpointer="v257"/></listitem> |
| 91 |
</varlistentry> |
| 92 |
|
| 93 |
<varlistentry> |
| 94 |
<term><command>features</command> [<replaceable>FEATURE</replaceable>]</term> |
| 95 |
|
| 96 |
<listitem><para>When no <replaceable>FEATURE</replaceable> is specified, this command lists all |
| 97 |
optional features. |
| 98 |
When a <replaceable>FEATURE</replaceable> is specified, this command lists all known information |
| 99 |
about that feature.</para> |
| 100 |
|
| 101 |
<xi:include href="version-info.xml" xpointer="v257"/></listitem> |
| 102 |
</varlistentry> |
| 103 |
|
| 104 |
<varlistentry> |
| 105 |
<term><command>enable</command> <replaceable>FEATURE</replaceable>…</term> |
| 106 |
<term><command>disable</command> <replaceable>FEATURE</replaceable>…</term> |
| 107 |
|
| 108 |
<listitem><para>These commands enable or disable optional features. |
| 109 |
See <citerefentry><refentrytitle>sysupdate.features</refentrytitle><manvolnum>5</manvolnum></citerefentry>. |
| 110 |
These commands always operate on the host system.</para> |
| 111 |
|
| 112 |
<para>By default, these commands will only change the system's configuration by creating or deleting |
| 113 |
drop-in files; they will not immediately download the enabled features, or clean up after the |
| 114 |
disabled ones. |
| 115 |
Enabled features will be downloaded and installed the next time the target is updated, and disabled |
| 116 |
transfers will be cleaned up the next time the target is updated or vacuumed. |
| 117 |
Pass <option>--now</option> to immediately apply these changes.</para> |
| 118 |
|
| 119 |
<xi:include href="version-info.xml" xpointer="v257"/></listitem> |
| 120 |
</varlistentry> |
| 121 |
|
| 122 |
<xi:include href="standard-options.xml" xpointer="no-ask-password" /> |
| 123 |
<xi:include href="standard-options.xml" xpointer="help" /> |
| 124 |
<xi:include href="standard-options.xml" xpointer="version" /> |
| 125 |
</variablelist> |
| 126 |
</refsect1> |
| 127 |
|
| 128 |
<refsect1> |
| 129 |
<title>Options</title> |
| 130 |
|
| 131 |
<para>The following commands are understood:</para> |
| 132 |
|
| 133 |
<variablelist> |
| 134 |
<varlistentry> |
| 135 |
<term><option>--reboot</option></term> |
| 136 |
|
| 137 |
<listitem><para>When used with the <command>update</command> command, reboots the system |
| 138 |
after updates finish applying. If any update fails, the system will not reboot.</para> |
| 139 |
|
| 140 |
<para>When used with the <command>enable</command> or <command>disable</command> commands and the |
| 141 |
<option>--now</option> flag, reboots the system after download or clean-up finish applying.</para> |
| 142 |
|
| 143 |
<xi:include href="version-info.xml" xpointer="v257"/></listitem> |
| 144 |
</varlistentry> |
| 145 |
|
| 146 |
<varlistentry> |
| 147 |
<term><option>--offline</option></term> |
| 148 |
|
| 149 |
<listitem><para>When used with the <command>list</command> command, disables fetching |
| 150 |
metadata from the network. This makes the <command>list</command> command only return |
| 151 |
information that is available locally (i.e. about versions already installed on the system). |
| 152 |
</para> |
| 153 |
|
| 154 |
<xi:include href="version-info.xml" xpointer="v257"/></listitem> |
| 155 |
</varlistentry> |
| 156 |
|
| 157 |
<varlistentry> |
| 158 |
<term><option>--now</option></term> |
| 159 |
|
| 160 |
<listitem><para>When used with the <command>enable</command> command, downloads and installs the |
| 161 |
enabled features. When used with the <command>disable</command> command, deletes all resources |
| 162 |
downloaded by the disabled features.</para> |
| 163 |
|
| 164 |
<xi:include href="version-info.xml" xpointer="v257"/></listitem> |
| 165 |
</varlistentry> |
| 166 |
|
| 167 |
<xi:include href="user-system-options.xml" xpointer="host" /> |
| 168 |
|
| 169 |
<xi:include href="standard-options.xml" xpointer="no-pager" /> |
| 170 |
<xi:include href="standard-options.xml" xpointer="no-legend" /> |
| 171 |
</variablelist> |
| 172 |
</refsect1> |
| 173 |
|
| 174 |
<refsect1> |
| 175 |
<title>Exit status</title> |
| 176 |
|
| 177 |
<para>On success, 0 is returned, a non-zero failure code otherwise.</para> |
| 178 |
</refsect1> |
| 179 |
|
| 180 |
<xi:include href="common-variables.xml" /> |
| 181 |
|
| 182 |
<refsect1> |
| 183 |
<title>Examples</title> |
| 184 |
|
| 185 |
<para>Note that these examples are just here for demonstration purposes, and the output of these commands |
| 186 |
is free to change. These commands are intended for display to a user. If you'd like machine-readable |
| 187 |
output, use the |
| 188 |
<citerefentry><refentrytitle>org.freedesktop.sysupdate1</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
| 189 |
D-Bus API directly.</para> |
| 190 |
|
| 191 |
<example> |
| 192 |
<title>Output from <command>list</command></title> |
| 193 |
|
| 194 |
<programlisting>$ <command>updatectl list</command> |
| 195 |
TARGET VERSION PATH |
| 196 |
host 48 sysupdate.d |
| 197 |
machine:fedora 38 /var/lib/machines/fedora.raw |
| 198 |
component:shim 15.7 sysupdate.shim.d |
| 199 |
$ <command>updatectl list host</command> |
| 200 |
VERSION STATUS |
| 201 |
↻ 50 candidate |
| 202 |
49 available |
| 203 |
● 48 current |
| 204 |
47 available |
| 205 |
46 available |
| 206 |
45 available |
| 207 |
[...] |
| 208 |
× 25 available+obsolete |
| 209 |
× 24 available+obsolete |
| 210 |
× 23 available+obsolete |
| 211 |
[...] |
| 212 |
$ <command>updatectl list host@49</command> |
| 213 |
↻ Version: 50 |
| 214 |
State: candidate |
| 215 |
ChangeLog: https://vendor.com/os/v50.html |
| 216 |
|
| 217 |
TYPE PATH PTUUID PTFLAGS SHA256 |
| 218 |
url-file http://dl.vendor.com/os/uki_50 - - 90f6534282dd720f7a222fa781086990dc9c83e5c7499f085970a8e75e3ac349 |
| 219 |
url-file http://dl.vendor.com/os/usr_50_981a5b84-a301-c819-f681-3e575fe16f16 981a5b84-a301-c819-f681-3e575fe16f16 - c0596ab1095258ec6f16c7c281a50d71c419a9f587c1ef858cfbbb69fb0a16f3 |
| 220 |
url-file http://dl.vendor.com/os/verity_50_2f8d0f3b-f80a-6ddc-a556-3722bfbb5b79 2f8d0f3b-f80a-6ddc-a556-3722bfbb5b79 - e1e90a128e038b3a53455e55d1ca717c743aba31fe6b4b4624109df0243c6338 |
| 221 |
url-file http://dl.vendor.com/os/verity_sig_50 - - ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356 |
| 222 |
</programlisting> |
| 223 |
</example> |
| 224 |
|
| 225 |
<example> |
| 226 |
<title>Checking for and installing updates</title> |
| 227 |
|
| 228 |
<programlisting>$ <command>updatectl check</command> |
| 229 |
TARGET UPDATE |
| 230 |
host 48 → 50 |
| 231 |
machine:fedora 38 → 40 |
| 232 |
$ <command>updatectl update host machine:fedora@39</command> |
| 233 |
[...] |
| 234 |
✓ host@50 |
| 235 |
✓ machine:fedora@39</programlisting> |
| 236 |
</example> |
| 237 |
|
| 238 |
</refsect1> |
| 239 |
|
| 240 |
<refsect1> |
| 241 |
<title>See Also</title> |
| 242 |
<para> |
| 243 |
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, |
| 244 |
<citerefentry><refentrytitle>systemd-sysupdate</refentrytitle><manvolnum>8</manvolnum></citerefentry> |
| 245 |
<citerefentry><refentrytitle>systemd-sysupdated.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> |
| 246 |
<citerefentry><refentrytitle>sysupdate.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>, |
| 247 |
</para> |
| 248 |
</refsect1> |
| 249 |
|
| 250 |
</refentry> |