SYSTEMD-SYSUPDATE(8)
๐ systemd-sysupdate โ bestie's guide to automatically updating your OS (and other stuff too) ๐
okay so first things first, this is the manual page for systemd-sysupdate (that's SYSTEMD-SYSUPDATE(8) if you're being formal, which we are not). It covers a whole little friend group of units: systemd-sysupdate, systemd-sysupdate-update.service, systemd-sysupdate-update.timer, systemd-sysupdate-reboot.service, systemd-sysupdate-reboot.timer, systemd-sysupdate-auto-enable.service, systemd-sysupdate.service, and systemd-sysupdate.timer. Their whole collective vibe? Automatically Update OS or Other Resources. slay.
โจ SYNOPSIS โจ
systemd-sysupdate [OPTIONS...]
systemd-sysupdate-update.service
๐งช EXPERIMENTAL ๐งช
okay bestie, deep breath. This component is experimental and subject to change without advance notice. It will be stabilized and given a backward-compatibility guarantee in a future release, but it might also possibly be removed. So likeโฆ it's giving "situationship with the kernel". be aware. ๐
๐ DESCRIPTION ๐
So systemd-sysupdate atomically updates the host OS, container images, portable service images, or other sources โ all based on the transfer configuration files described over in sysupdate.d(5).
This tool implements file, directory, or partition based update schemes, and it supports multiple parallel installed versions of specific resources in an A/B style (or even A/B/C, A/B/C/D/, โฆ sky's the limit honestly). What does A/B updating mean, you ask? ๐ฆ It means that when one version of a resource is currently being used, the next version can be downloaded, unpacked, and prepared in an entirely separate location, independently of the first โ and once it's complete, it gets activated, swapping the roles so that the new one becomes the used one and the previously used one becomes the one that gets replaced by the next update. And so on, forever, like a beautiful little relay race. ๐โโ๏ธ
The resources to update are defined in transfer files โ one for each resource to be updated. For example, resources that may be updated with this tool could be: a root file system partition, a matching Verity partition plus one kernel image. The combination of the three? That's considered a complete OS update. iconic.
The tool updates partitions, files or directory trees always in whole, and it operates with at least two versions of each of these resources: the current version, plus the next version โ the one that is being updated to, which is initially incomplete as the downloaded data is written to it. Plus optionally more versions, because why not. โจ Once the download of a newer version is complete, it becomes the current version, releasing the version previously considered current for deletion/replacement/updating. no cap.
When installing new versions, the tool will directly download, decompress, unpack and write the new version into the destination. This is done in a robust fashion so that an incomplete download can be recognized on next invocation and flushed out before a new attempt is initiated. ๐ it's giving self-aware.
โ ๏ธ Heads up bestie: when writing updates to a partition, the partition has to exist already.systemd-sysupdatewill not automatically create new partitions. Use a tool such assystemd-repart(8)to automatically create additional partitions to be used withsystemd-sysupdateon boot. don't forget or you'll be sad. ๐ญ
The tool can be used both on the running OS โ to update the OS in "online" state from within itself โ and on "offline" disk images, to update them from the outside based on transfer files embedded in the disk images. For the latter, see --image= below. The latter is particularly interesting to update container images or portable service images. ๐
The systemd-sysupdate-update.service system service will automatically update the host OS based on the installed transfer files. It is triggered in regular intervals via systemd-sysupdate-update.timer. The systemd-sysupdate-reboot.service will automatically reboot the system after a new version is installed. It is triggered via systemd-sysupdate-reboot.timer. The two services are separate from each other, because it is typically advisable to download updates regularly while the system is up, but delay reboots until the appropriate time (i.e. typically at night ๐). The two sets of service/timer units may be enabled separately.
The systemd-sysupdate-auto-enable.service system service automatically enables all suggested components and all suggested features of all components before each update. It is ordered before and pulled in by systemd-sysupdate-update.service, and it is not enabled by default. Enable it if newly suggested components and features shall be picked up automatically as they become available, rather than requiring manual enable-component/enable-feature invocations. lowkey convenient. ๐ซถ
For details about transfer files and examples, see sysupdate.d(5).
๐ COMMAND ๐
The following commands are understood (get ready, there's a bunch, and they all ate):
list [VERSION]โ If you run it with no argument, it enumerates downloadable and installed versions, and shows a summarizing table with the discovered versions and their properties, including whether there's a newer candidate version to update to. If you specify a version argument, it shows details about that specific version, including the individual files that need to be transferred to acquire the version. If no command is explicitly specified, this command is implied. (Added in version 251.)features [FEATURE]โ If you run it with no argument, it enumerates optional features and shows a summarizing table, including which features are enabled or disabled. If you specify a feature argument, it shows details about that specific feature, including the transfers that are controlled by the feature. (Added in version 257.)enable-feature FEATURE...,disable-feature FEATURE...โ Enables or disables the specified optional features. This writes anEnabled=setting into a drop-in next to the feature definition, seesysupdate.features(5)for details. The features may be specified either as arguments or selected via the--feature-allor--feature-suggestedswitches. Note that this only changes the configuration: to actually download the newly enabled transfers, or remove the disabled ones, invokeupdateorvacuumafterwards. don't skip that step, bestie. ๐ (Added in version 262.)check-newโ Checks if there's a new version available. Internally it enumerates downloadable and installed versions and returns exit status0if there's a new version to update to, non-zero otherwise. If there is a new version to update to, its version identifier is written to standard output. (Added in version 251.)update [--offline] [VERSION]โ Installs (updates to) the specified version, or if none is specified, to the newest version available. If the version is already installed or no newer version is available, no operation is executed. If--offlineis specified, the update must already have been acquired usingacquire, and if so, this pre-acquired version is the one which will be updated to. (Added in version 251.)acquire [VERSION]โ Acquires (downloads) the specified version, ready to install it. If no version is specified, the newest version available is acquired. If the version is already installed or no newer version is available, no operation is executed. If a new version to install/update to is found, old installed versions are deleted until at least one new version can be installed, as configured viaInstanceMax=insysupdate.d(5), or via the available partition slots of the right type. This implicit operation can also be invoked explicitly via thevacuumcommand described below. (Added in version 260.)vacuumโ Deletes old installed versions until the limits configured viaInstanceMax=insysupdate.d(5)are met again. Normally, it should not be necessary to invoke this command explicitly, since it is implicitly invoked whenever a new update is initiated. (Added in version 251.)pendingโ Checks whether a newer version of the OS is installed than the one currently running. Returns zero if so, non-zero otherwise. This compares the newest installed version's identifier with the OS image version as reported by theIMAGE_VERSION=field in/etc/os-release. If the former is newer than the latter, an update was apparently completed but not activated (i.e. not rebooted into) yet. ๐ณ the audacity. (Added in version 251.)rebootโ Similar to thependingcommand, but immediately reboots in case a newer version of the OS has been installed than the one currently running. This operation can be done implicitly together with theupdatecommand, after a completed update via the--rebootswitch, see below. This command will execute no operation (and return success) if no update has been installed, and thus the system was not rebooted. (Added in version 251.)componentsโ Lists components that can be updated. This enumerates the/etc/sysupdate.*.d/,/run/sysupdate.*.d/and/usr/lib/sysupdate.*.d/directories that contain transfer files. This command is useful to list possible parameters for--component=(see below). (Added in version 251.)enable-component COMPONENT...,disable-component COMPONENT...โ Enables or disables the specified components. This writes anEnabled=setting into a drop-in next to the component definition. The components may be specified either as arguments or selected via the--component=,--component-allor--component-suggestedswitches. (Added in version 262.)cleanupโ Removes orphaned files that were previously installed by a transfer, but are no longer owned by any currently defined transfer file. Whenever a resource is installed into the file system,systemd-sysupdaterecords the target directory and the matching pattern in an installation database below/var/lib/systemd/sysupdate/. This command iterates through these records, determines which files they match, and deletes those that are no longer covered by any of the patterns of the transfer files currently in place. This is useful to garbage-collect files that used to be owned by a transfer file that has since been modified, disabled or removed altogether (for example because a component is no longer being updated). By default only the selected component is processed (i.e. the one selected via--component=, or the default one if none were selected). Use--component-allto process all components known to the installation database in a single invocation. This operation only removes files that were installed into the file system (i.e. resources of type"regular-file","directory"and"subvolume", seesysupdate.d(5)); it does not touch partition-based resources. (Added in version 262.)-h,--helpโ Print a short help text and exit. ๐ซถ--versionโ Print a short version string and exit. โจ
โจ OPTIONS โจ
Okay bestie, here's the whole menu of switches you can hand this thing. It's a lot, but we're gonna go through them one by one and you're gonna eat ๐
--component=,-Cโ picks which component you wanna update. Takes a component name as its argument. And here's the lil plot twist: using it slightly alters how the search for transfer files works. Don't use this switch and the transfer files come from/etc/sysupdate.d/*.conf,/run/sysupdate.d/*.confand/usr/lib/sysupdate.d/*.conf. Use it and that component name rewrites the directories to look in, becoming/etc/sysupdate.component.d/*.conf,/run/sysupdate.component.d/*.confand/usr/lib/sysupdate.component.d/*.confโ each time with the component string swapped out for the name you gave.
Wanna see what's even available? Run the components command, which just enumerates the directories matching that naming rule. ๐
So like, components let you define a totally separate set of transfer files for different chunks of the OS that get updated on their own schedule. But do NOT reach for this when the resources should always move together in sync โ for that, just define multiple transfer files inside the same sysupdate.d/ directory. Simple. Periodt.
This option may not be combined with --definitions=, nor with the pending and reboot commands or the --reboot switch โ those only apply to the booted OS version anyway.
Added in version 251.
--component-all,-Aโ instead of one component, go off on every known component (plus the default, component-less installation). Supported for theupdate,acquire,cleanup,enable-feature,disable-feature,enable-componentanddisable-componentcommands. Every other command will straight up fail if you use this switch. ๐
This option may not be combined with --component=.
Added in version 262.
--component-suggested,-Sโ basically--component-all's cousin, but only touches the components currently suggested for this system, as determined by theSuggest=andSuggestOn...=settings in the component definition files. Supported for theenable-componentanddisable-componentcommands. Both commands operate on the same set of components, sodisable-componentundoes exactly whatenable-componentdid. Symmetry, iconic. ๐ฆ
This option may not be combined with --component=.
So if you wanna reconcile the system according to suggestions โ like, also turning off the components that aren't (or aren't anymore) suggested โ first disable everything with --component-all, then enable the suggested ones with this switch. Heads up though: this has wider consequences than the equivalent reconciliation of optional features, because components are enabled by default, and a component counts as not suggested unless Suggest= or one of the SuggestOn...= settings says otherwise. So reconciling explicitly disables every component that isn't suggested โ including components that ship no *.component file at all. The default component is not affected. ๐ญ
Added in version 262.
--feature-all,-aโ instead of operating on the features you listed on the command line, operate on all optional features known to the selected component(s). Supported for theenable-featureanddisable-featurecommands.
Added in version 262.
--feature-suggested,-sโ like--feature-allbut only the optional features currently suggested for this system, as determined by theSuggest=andSuggestOn...=settings in the feature definition files. Supported for theenable-featureanddisable-featurecommands. Both commands operate on the same set of features, sodisable-featureundoes whatenable-featuredid. ๐ซถ
To reconcile the system according to suggestions โ i.e. also turning off the features that aren't (or no longer are) suggested โ first disable all features with --feature-all, then enable the suggested ones with this switch.
Added in version 262.
--definitions=โ a path to a directory. If you specify it, the transfer*.conffiles get read from there instead of/usr/lib/sysupdate.d/*.conf,/etc/sysupdate.d/*.conf, and/run/sysupdate.d/*.conf.
This option may not be combined with --component=.
Added in version 251.
--root=โ takes a path to a directory to use as the root file system when it goes hunting forsysupdate.d/*.conffiles.
Added in version 251.
--image=โ takes a path to a disk image file or device to mount and use, in a similar fashion to--root=up there. And if this is used and partition resources are updated, that happens inside the specified disk image. ๐ธ
Added in version 251.
--image-policy=policyโ takes an image policy string as its argument, as persystemd.image-policy(7). The policy gets enforced when operating on the disk image specified via--image=, see above. If you don't specify it, it defaults to the"*"policy โ meaning all recognized file systems in the image are used.--instances-max=,-mโ takes a decimal integer greater than or equal to2while updating, or1while vacuuming. Controls how many versions to keep at any given time. You can also configure this inside the transfer files via theInstancesMax=setting โ peepsysupdate.d(5)for the deets.
Added in version 251.
--sync=โ takes a boolean argument, defaults toyes. Specifies whether the newly updated resource versions shall be synchronized to disk when appropriate (i.e. after the download is complete, before it's finalized, and again after finalization). Don't turn this off โ unless you're just trying to improve runtime performance in a testing environment. ๐
Added in version 251.
--verify=โ takes a boolean argument, defaults toyes. Controls whether to cryptographically verify downloads. Do not turn this off, except in testing environments. Like, for real. ๐จ
Added in version 251.
--rebootโ when used together with the update commands and a new version actually gets installed, it automatically reboots the system immediately afterwards. May not be combined with--component=, since it only applies to the booted OS version.
Added in version 251.
--cleanup=โ takes a boolean argument. When used with theupdatecommand, it automatically does the equivalent of thecleanupcommand afterwards, removing any orphaned files no longer covered by the patterns of the currently defined transfer files. Super handy for garbage-collecting files that used to be owned by a transfer file that has since been modified, disabled or removed. Defaults tooff.
Added in version 262.
--offlineโ prevents fetching metadata from the network (i.e.SHA256SUMS). Most useful with thelistcommand, to query locally installed versions. ๐
If you use it with the update command, it lets updates be downloaded in advance (using acquire) and installed later.
Added in version 257.
--transfer-source=โ takes a path as its argument. When specified, all transfer sources configured withPathRelativeTo=explicitget interpreted relative to the specified path.
Added in version 257.
--no-pagerโ do not pipe output into a pager.--no-legendโ do not print the legend, i.e. the column headers and the footer with hints.--json=MODEโ shows output formatted as JSON. Expects one of"short"(the shortest possible output, no redundant whitespace or line breaks),"pretty"(a pretty version of the same, with indentation and line breaks) or"off"(to turn off JSON output, which is the default).
๐ EXIT STATUS ๐
On success, 0 is returned. Anything else is a non-zero failure code. That's the vibe check. โจ
๐ SEE ALSO ๐
systemd(1), sysupdate.d(5), sysupdate.features(5), sysupdate.components(5), systemd-sysupdated.service(8), systemd-repart(8)
And that's the whole page bestie, you ate that ๐
This one's from systemd 262.1 and it's the SYSTEMD-SYSUPDATE(8) manual โ go forth and update responsibly, mwah ๐ซถ๐
๐ฆ where this page comes from
- arch rolling: systemd 262.1-1 ยท LGPL-2.1-or-later AND CC0-1.0 AND GPL-2.0-or-later AND MIT-0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms