跳转到主要内容

updatectl

systemd

updatectl

1

updatectl

Control the system update service

updatectl

OPTIONS

COMMAND

TARGET

Description

updatectl may be used to check for and install system updates managed by systemd-sysupdated.service(8).

Commands

The following commands are understood:

list [<TARGET>[@<VERSION>]]
Show information about targets and their versions.

When no <TARGET> is specified, this command lists all available targets. When a <TARGET> is specified without a <VERSION>, this command lists all known versions of the specified target. If a <VERSION> is specified, this command lists all known information about the specific version.

See the example below for details of the output.

check [<TARGET>…]
Check if any updates are available for the specified targets. If no targets are specified, all available targets will be checked for updates.

See the example below for details of the output.

update [<TARGET>[@<VERSION>]…]
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.

vacuum [<TARGET>…]
Clean up old versions of the specified targets. If no targets are specified, all available targets will be vacuumed.

features [<FEATURE>]
When no <FEATURE> is specified, this command lists all optional features. When a <FEATURE> is specified, this command lists all known information about that feature.

enable <FEATURE>…; disable <FEATURE>…
These commands enable or disable optional features. See sysupdate.features(5). These commands always operate on the host system.

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 --now to immediately apply these changes.

Options

The following commands are understood:

--reboot
When used with the update command, reboots the system after updates finish applying. If any update fails, the system will not reboot.

When used with the enable or disable commands and the --now flag, reboots the system after download or clean-up finish applying.

--offline
When used with the list command, disables fetching metadata from the network. This makes the list command only return information that is available locally (i.e. about versions already installed on the system).

--now
When used with the enable command, downloads and installs the enabled features. When used with the disable command, deletes all resources downloaded by the disabled features.

Exit status

On success, 0 is returned, a non-zero failure code otherwise.

Examples

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 org.freedesktop.sysupdate1(5) D-Bus API directly.

Output from list

$ updatectl list
TARGET         VERSION PATH
host           48      sysupdate.d
machine:fedora 38      /var/lib/machines/fedora.raw
component:shim 15.7    sysupdate.shim.d
$ updatectl list host
  VERSION STATUS
↻ 50      candidate
  49      available
● 48      current
  47      available
  46      available
  45      available
[...]
× 25      available+obsolete
× 24      available+obsolete
× 23      available+obsolete
[...]
$ updatectl list host@49
↻ 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

Checking for and installing updates

$ updatectl check
TARGET         UPDATE
host           48 → 50
machine:fedora 38 → 40
$ updatectl update host machine:fedora@39
[...]
✓ host@50
✓ machine:fedora@39

See Also

systemd(1), systemd-sysupdate(8) systemd-sysupdated.service(8) sysupdate.d(5),