SYSTEMD-UP...E.SERVICE(8)
๐ systemd-update-done.service, systemd-update-done โ marking /etc/ and /var/ as fully updated โจ
okay bestie, this one's from the systemd-update-done.service manual (section 8, system manager stuff, iykyk) and honestly it's giving "quiet little helper that does one extremely specific thing and does it flawlessly" ๐
๐ SYNOPSIS ๐
systemd-update-done.service
/usr/lib/systemd/systemd-update-done
like. that's it. that's the whole vibe. โจ
๐ธ DESCRIPTION ๐ธ
so systemd-update-done.service is a service that gets invoked as part of the first boot after the vendor operating system resources in /usr/ have been updated. which is lowkey so useful, because it lets you implement offline updates of /usr/ โ the kind that might need updates to /etc/ or /var/ on the boot that comes right after ๐ฆ
and here's the actual magic trick: systemd-update-done.service updates the file modification time (mtime) that's stored in and "on" the files /etc/.updated and /var/.updated, setting it to the modification time of the /usr/ directory. unless those stamp files are already newer, in which case it justโฆ doesn't. respect. ๐
tiny nerdy aside, no cap: the timestamp is stored as the mtime field on the file, but also in the file, so that filesystems which don't store full timestamp precision are still supported. the way that's so thoughtful of them ๐ญ
so if you've got services that should run after offline upgrades of /usr/, you should order them before systemd-update-done.service, and use the ConditionNeedsUpdate= condition (peep systemd.unit(5)) to make sure they run when /etc/ or /var/ are older than /usr/ โ according to the modification times of the files we just talked about ๐
โ ๏ธ but heads up: this requires that updates to /usr/ are always followed by an update of the modification time of /usr/, for example by invoking touch(1) on it. every single time. no skipping. periodt.
๐ซถ ALSO. super important. if thesystemd.condition_needs_update=kernel command line option is used, it overrides theConditionNeedsUpdate=unit condition checks. in that casesystemd-update-done.servicewill not reset the condition state until a follow-up reboot happens where that kernel switch is not specified anymore. so like, it stays in that state until you reboot clean. noted. ๐
โจ OPTIONS โจ
these are the options it understands, bestie:
--root=rootโ takes a directory path as an argument, and the program will operate on paths below the specified root directory. ๐ง
Added in version 258.
-h,--helpโ prints a short help text and exits. classic. ๐--versionโ prints a short version string and exits. the little "who am i" moment โญ
๐ SEE ALSO ๐
systemd(1), systemd.unit(5), touch(1) ๐
and that's the whole page, bestie!! go forth and let your /etc/ and /var/ know they're fully updated ๐
๐ธ this was brought to you by systemd 262.1, page SYSTEMD-UP...E.SERVICE(8) โ mwah, stay slaying ๐ซถโจ
๐ฆ 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