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