Introducing a new way to review your PRs.

Read the announcement

omacom / omarchy

Beautiful, Modern & Opinionated Linux

View on GitHub

29 documents · Updated Nov 23, 2026

docs / update-orchestration-and-system-maintenance

Update orchestration and system maintenance

The update system provides controlled paths for checking, confirming, and applying Omarchy and system updates. It coordinates package work, user migrations, firmware maintenance, cleanup, restart needs, and user feedback so that each change reaches the next stage with the right safety checks. This page complements System updates and migrations and Migration framework.

Update availability

The update check tells the shell whether the active Omarchy source has new work. It checks upstream commits for a development checkout and checks the installed Omarchy package after the first update; before that first update, any pending system package update is enough to require one.

The check has two outcomes:

  • Available updates produce a list and a successful result.
  • No Omarchy updates produce an up-to-date message and a non-success result.

The shell uses this result to refresh its update indicator. The same status is cleared after the main update completes because the update has already brought the active source through its package stage; a status helper remains for updates started by an older command flow.

References: bin/omarchy-update-available• L7-45 bin/omarchy-update-status• L1-10

Update entry and coordination

omarchy update is the main update command. It records a transcript, keeps the foreground terminal session tied to the update, prevents overlapping update runs, checks that the system has enough free space, and asks the user to confirm before it changes the system. The -y form skips the Omarchy confirmation prompt and marks review steps as unattended, but it still needs privilege and does not make decision-based package conflicts safe to guess.

The update uses one coordinated lifecycle:

flowchart TD
    A[Acquire update lock] --> B[Check free space]
    B --> C[Confirm update]
    C --> D[Authorize update]
    D --> E[Prune cache and create snapshot]
    E --> F[Keep system awake]
    F --> G[Update source and signing keys]
    G --> H[Upgrade system packages]
    H --> I[Refresh shell and run migrations]
    I --> J[Clean up and analyze logs]
    J --> K[Clear update status and restart services]
    K --> L[Run hooks and optional tool updates]
    L --> M[Update AUR packages]
    M --> N[Verify boot files]
    N --> O[Release protection and offer reboot]

The lock covers the full update. A second run stops instead of changing the system beside the first run. The lock is held by an inherited file descriptor, while the PID written to the lock file is only a diagnostic value. The update also prevents sleep and idle actions while package work, hooks, tools, and AUR builds run. Its inhibitor records enough ownership and process state to remove only the inhibitor that this update started, then the update releases that protection before it offers a reboot.

References: bin/omarchy-update• L14-53 bin/omarchy-update• L56-115 bin/omarchy-update• L117-165 bin/omarchy-update-lock• L9-50 bin/omarchy-update-stay-awake• L362-439 bin/omarchy-update-stay-awake• L441-586

Confirmation and privilege

The interactive start prompt warns that the update cannot be stopped safely after it begins and asks the user to confirm power readiness. After confirmation, the update creates one sudo authorization and keeps it valid through package work, migrations, hooks, tool updates, AUR builds, and boot verification. A background keepalive refreshes that authorization during long work. It invalidates that authorization during cleanup, including when the update fails.

The AUR phase follows the system package phase because AUR packages build against the upgraded system. It remains inside the main update authorization window. Boot verification is the last sudo-capable step; the update ends its authorization only after that check returns, then releases its sleep protection before it offers a reboot.

References: bin/omarchy-update-confirm• L1-18 bin/omarchy-update• L14-53 bin/omarchy-update• L80-99 bin/omarchy-update• L137-153

Package and source updates

The package stage brings the active Omarchy source and system packages to the selected channel. A development checkout is fast-forwarded first when Omarchy runs from a checkout. Before the main system transaction, the update prepares the signing keys for Omarchy and the enabled Arch repositories. On aarch64 it also prepares the separate Arch Linux ARM trust path, and it refreshes keyrings named by installed platform packages. The Omarchy key is obtained from Omarchy's Web Key Directory and accepted only when its pinned fingerprint matches. If the Arch Linux ARM key is not trusted, the updater can populate the installed keyring or use Omarchy's shipped copy instead of depending on a public key server. It verifies that the required trust data is usable, so key failures stop before they become package signature errors in the wider upgrade.

The system package transaction is the center of the update. It runs through the Omarchy pacman path and can recover from Omarchy files that are present on disk but not owned by a package. The recovery moves those files out of the live path and restores them if the retry does not install replacements. A package-to-package conflict remains a user decision, so unattended updates stop and ask the user to run the update interactively.

The package transaction is isolated from session teardown when systemd is active. This allows an upgrade that refreshes system services to finish as one transaction instead of being killed by a manager restart.

References: bin/omarchy-update-dev• L7-27 bin/omarchy-update-keyring• L3-20 bin/omarchy-update-keyring• L23-105 bin/omarchy-update-system-pkgs• L1-39 bin/omarchy-update-system-pkgs-when-conflicted• L64-126 bin/omarchy-update• L103-110

Pacman configuration refresh

omarchy-refresh-pacman restores the pacman configuration and mirror list for a selected Omarchy channel and platform, then performs a full package database refresh and upgrade. It is a repair and channel-alignment command for package configuration rather than a second update lifecycle.

The command validates the channel, platform, and matching configuration templates before it changes the system. It renders the target configuration, keeps backups of the active pacman files, and runs the pre-refresh hook before the package transaction. The hook and the package work use restricted privilege boundaries. User changes to pacman configuration can therefore shape the following downgrade-capable transaction without carrying update authorization into that work. Stable and release-candidate channels leave development packages to the channel-switch flow so an old development build cannot move the machine before that switch is complete.

References: bin/omarchy-refresh-pacman• L27-68 bin/omarchy-refresh-pacman• L70-99

AUR package updates

The AUR stage updates user-built packages only when the system has AUR packages installed and the AUR is reachable. It runs after the system package transaction so builds use the new system state. The updater clears toolchain variables that could make package builds use a different Go environment, and it lets yay remove build files after each successful build while skipping the known gcc14 transition packages.

If AUR access is unavailable, the update reports that it skipped this stage. A build failure remains an update failure in the main lifecycle; the standalone transition path warns and leaves the remaining update work available for a later run.

References: bin/omarchy-update-aur-pkgs• L3-21 bin/omarchy-update• L134-139 bin/omarchy-upgrade-to-quattro• L1318-1325

Cache and firmware maintenance

Cache cleanup and firmware update are related maintenance tasks with different places in the product flow. Cache cleanup runs inside the normal update before the snapshot. It keeps two package versions so the cache remains useful for a local downgrade while it does not grow without limit.

Firmware update is a separate command rather than a routine package stage. It uses fwupd to refresh firmware data and apply available device firmware. On EFI systems it also makes the firmware update loader available in the system EFI path.

Maintenance actionUser purposeNormal placement
Package cache pruningLimit old package data while keeping a downgrade pathBefore the update snapshot
Firmware updateApply device firmware offered by fwupdManual maintenance command

References: bin/omarchy-update-pkg-prune• L1-13 bin/omarchy-update-firmware• L1-18 bin/omarchy-update• L91-99

Qualcomm boot image support

The Qualcomm device-tree refresh keeps boot image hardware choices aligned with the installed Snapdragon kernel. It selects the supported Windows-on-ARM board trees from the active kernel tree set and refreshes Omarchy's managed DeviceTreeAuto list in the UKI configuration. At boot, systemd-stub uses SMBIOS data to select the matching tree.

The refresh also records the machine's own running tree when it can identify one. That tree acts as a fallback when SMBIOS data has no match, so a new or unknown board can still boot with its installed hardware tree. The boot image builder runs this refresh before each image build. A kernel update can therefore add or move a supported tree without leaving the next UKI with an old list.

The refresh keeps unrelated UKI settings intact. Setup can create the managed list with --install; later runs only refresh a list that Omarchy already owns. If no trees exist or a safe configuration write is not possible, it keeps the last list. A successful change signals that the boot image must be rebuilt so the UKI carries the new settings.

References: bin/omarchy-update-qualcomm-device-trees• L3-15 bin/omarchy-update-qualcomm-device-trees• L22-57 bin/omarchy-update-qualcomm-device-trees• L59-95 bin/omarchy-update-qualcomm-device-trees• L97-165

Factory reset

The factory reset returns a supported Omarchy installation to its provisioning state for sale or handoff. It uses the factory snapshot made by the Quattro installer as the baseline, removes the current machine and user state, prepares a fresh bootable root, and completes the transition after reboot.

The reset follows a staged path so a failed preparation can preserve the current system:

flowchart TD
    A[Confirm reset] --> B[Check factory baseline and boot owner]
    B --> C[Clone and scrub factory system]
    C --> D[Prepare and verify boot state]
    D --> E[Activate fresh root]
    E --> F[Reboot into provisioning]
    F --> G[First-boot setup creates new owner state]

Only systems with the installer-created factory snapshot and a supported standard layout can use this reset. It is not a secure erase. On encrypted systems, a temporary unlock path supports the provisioning window until first-boot setup establishes the new owner's credentials.

References: bin/omarchy-system-factory-reset• L3-29 bin/omarchy-system-factory-reset• L630-713 bin/omarchy-system-factory-reset• L715-758

Migrations and cleanup

After pacman completes, the update checks for pending migrations and refreshes the shell before running them. This timing lets migrations use the newly installed packages and one running copy of current shell code. It also keeps migration work in the visible update flow instead of applying user changes during package installation.

The update then reviews orphaned packages and analyzes the update transcript for known high-risk signals. The main update passes -y to orphan cleanup, so orphaned packages found in this path are removed without a second prompt. The standalone orphan command still supports an interactive review and does not remove packages when a non-interactive caller omits -y. Log analysis checks for an initramfs generation start without a matching success message and warns the user to review the logs before restart. On Apple Silicon, it accounts for the hook message that pacman prints even when that hook does not build an initramfs.

References: bin/omarchy-update• L107-119 bin/omarchy-update-orphan-pkgs• L8-31 bin/omarchy-update-analyze-logs• L1-22

Restart and reboot handling

Restart handling separates work that can happen while the update is running from the final reboot choice. After migrations and log analysis, the system restarts components marked as needing a restart. The final reboot-only phase then checks whether a new kernel, a pending reboot marker, or a replaced Hyprland process requires a full reboot.

Boot verification is the gate between AUR work and the reboot choice. It asks the platform lifecycle for its boot-chain check. A platform without a registered boot package receives a warning instead of blocking the update; a failed check blocks completion and tells the user not to reboot until the update succeeds. The update revokes its authorization after this check and before it offers a reboot.

The reboot prompt is unprivileged and is delayed until the update has released its sleep inhibitor and privileged authorization. In unattended mode, the system reports that a reboot is needed and leaves the action to omarchy-system reboot rather than rebooting without user review.

flowchart LR
    A[Package and migration work] --> B[Restart marked services]
    B --> C[Run hooks and AUR work]
    C --> D[Verify boot files]
    D --> E{Reboot required?}
    E -- No --> F[Finish]
    E -- Yes --> G[Ask user or print command]

References: bin/omarchy-update-restart• L14-69 bin/omarchy-update-boot• L21-39 bin/omarchy-update• L127-165

User notifications

The update system gives users feedback before work starts, while update state changes, and after an update path leaves user migrations pending. The shell indicator reflects current availability. The main update clears it after the package stage succeeds, while the status helper keeps older update flows from leaving a stale indicator.

A post-update hook can send a notification after a successful system update. A login-time migration notifier checks the current user's pending migration state and invites the user to run migrations when a direct package update bypassed the normal flow.

The migration notification does not run while the update lock is held. It waits for the notification service and checks the lock again before sending, so it does not show a stale prompt for work that an active update is already about to perform. If desktop notification delivery is not available, it prints the action in a terminal instead.

References: bin/omarchy-update-status• L1-10 bin/omarchy-migrate-notify• L1-60 bin/omarchy-update-user-notify• L1-6 config/…/show-update-notification.sample• L1-7 bin/omarchy-update• L121-126

Direct pacman protection

The package manager guard keeps a direct system upgrade from bypassing the update lifecycle. A direct pacman system upgrade is stopped before package changes unless the command came from an Omarchy-owned update path or the user explicitly chose to bypass the guard.

This protection matters because a direct transaction would not automatically include the Omarchy snapshot, migrations, hooks, status refresh, and restart checks. If a user does bypass it, the next login can still show a migration prompt based on the user's actual pending migration state.

References: bin/omarchy-update-pacman-guard• L1-64 docs/update-process.md• L66-115 docs/update-process.md• L170-237

Legacy installation transition

omarchy upgrade to quattro moves a pre-quattro installation to the package-backed Omarchy layout. It is a one-way transition, so it asks the user to confirm a backup plan before it changes the system unless --yes is used. The command selects the matching stable, release-candidate, or edge package channel, with an optional development package path.

The transition protects the old system while it changes both system and user state. It can create a pre-upgrade snapshot, backs up selected configuration, installs the package-backed system, retires old packages and services, and preserves user customizations where it can identify them. It keeps the running legacy session usable through the change and treats reboot as the final cutover to the new layout.

The transition follows a staged path so boot safety and migration state are checked before reboot:

flowchart TD
    A[Confirm one-way transition] --> B[Protect current system]
    B --> C[Align package channel and trust]
    C --> D[Install Quattro system packages]
    D --> E[Move system and user state]
    E --> F[Run migrations and maintenance]
    F --> G[Check boot entries and kernel command lines]
    G --> H{Boot state safe?}
    H -- No --> I[Stop and repair before reboot]
    H -- Yes --> J[Reboot into Quattro]

An incomplete transition must not be rebooted. The command reports this state and supports a safe rerun that resumes the remaining work. It can also refresh AUR and managed tools, update the indicator, and offer an automatic reboot after the transition completes.

References: bin/omarchy-upgrade-to-quattro• L318-355 bin/omarchy-upgrade-to-quattro• L362-383 bin/omarchy-upgrade-to-quattro• L440-460 bin/omarchy-upgrade-to-quattro• L524-687 bin/omarchy-upgrade-to-quattro• L2436-2499

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep the update lock contract aligned between omarchy-update, omarchy-update-lock, and omarchy-migrate-notify; otherwise a login notification can overlap an active update.
  • Keep the lock file descriptor inherited by the update process and its children; the diagnostic PID and file presence must not become unlock signals.
  • Keep the pacman invocation marker and the ALPM guard in sync; otherwise the normal package transaction can be rejected as a direct upgrade.
  • Keep the free-space check before confirmation and snapshot creation; otherwise a low-space update can start after the user approves it.
  • Keep the stage order intact when changing package or migration work; migrations depend on the packages that the preceding transaction installed.
  • Keep the update authorization alive through AUR work and boot verification, then revoke it before reboot handling; moving that boundary can break privileged stages or expose reboot handling to stale authorization.
  • Keep the boot verification result aligned with the final reboot gate; a failed verification must not offer a reboot or report a finished update.
  • Keep restart markers and reboot checks aligned with the state files that migrations and package hooks create.
  • Keep update availability and status refresh behavior aligned so the shell does not retain a stale update indicator.
  • Keep signing-key preparation aligned with every repository enabled by the platform. The Omarchy fingerprint, Arch Linux ARM trust path, and platform keyring list must all be checked before the main package transaction.
  • Keep the signing-key source and trust check paired; a key fetched from Omarchy's Web Key Directory or shipped for Arch Linux ARM must not become trusted unless its expected fingerprint is present and valid.
  • Keep the sleep inhibitor's ownership and cleanup contract aligned with the update lifecycle; a failed or interrupted run must not stop another process or leave the system blocked from sleep.
  • Keep channel selection, rendered pacman templates, the pre-refresh hook, and the refresh transaction aligned; a channel repair must not write a configuration that the following upgrade cannot use or carry update authorization into hook code.
  • Keep the AUR build environment independent of mise's toolchain variables; otherwise Go-based AUR builds can fail even when the system compiler is usable.
  • Keep optional mise updates non-blocking while preserving the later AUR and boot-verification stages; a tool download failure must not skip the checks for the system update.
  • Keep the legacy transition's channel selection, package names, and package repository mapping aligned; development packages must not be selected from the stable package source.
  • Keep the transition's backup, live-session compatibility, migration, and boot checks in order; an incomplete transition must remain recoverable and must not offer a reboot.
  • Keep the factory baseline, provisioning units, and boot-reset owner aligned; a reset must not stage a root that cannot complete first-boot setup.
  • Keep reset rollback and reboot staging aligned; a failed boot preparation must leave the current root and its boot files recoverable.
  • Keep the update's transcript, shell refresh, migration, service restart, hook, and reboot stages aligned; moving a stage can leave later work running against stale shell code or stale services.
  • Keep the Qualcomm device-tree list and machine fallback tied to the trees installed by the selected kernel; otherwise the UKI can omit the board tree that systemd-stub needs for hardware selection.
  • Keep the pre-image refresh and image-rebuild signal aligned; a changed UKI configuration must be included in the boot image before the next boot.

Important failure modes

TriggerConsequenceGuard
A second update starts while one holds the lockThe second update stops without changing the systemomarchy-update-lock uses a non-blocking file lock held by an inherited descriptor
Root has less than 10 GiB freeThe update stops before confirmationomarchy-update-requires-free-space checks /
A package conflict needs a choice during -y or a non-terminal runThe package stage stops instead of waiting for an unanswered promptThe conflict handler requires an interactive rerun
Required repository signing data cannot be trustedThe package stage stops before the wider upgradeomarchy-update-keyring obtains the Omarchy key from its Web Key Directory, validates its pinned fingerprint, restores Arch Linux ARM trust from an installed or shipped keyring, and refreshes installed platform keyrings
AUR or boot verification runs after the update authorization endsA required privileged stage can fail before the update reaches its reboot gateomarchy-update ends authorization only after boot verification
The update sleep inhibitor has unsafe or unverifiable stateThe inhibitor refuses the state operation instead of risking another process or an unsafe state cleanupomarchy-update-stay-awake validates its state boundary and process identity
Boot verification fails after package and AUR workThe update reports failure and does not offer a rebootomarchy-update-boot gates the reboot-only phase
A new kernel or reboot marker is presentRunning processes can use old system code until rebootomarchy-update-restart prompts or prints the reboot command
Initramfs generation starts without its success markerThe update warns the user to review logs before restartomarchy-update-analyze-logs checks the platform-specific hook message and the success message, including the Apple Silicon hook behavior
A direct pacman system upgrade bypasses the main commandMigrations and post-update actions can remain undoneThe ALPM guard stops the transaction or the login notifier reports pending migrations
A pacman refresh has an unknown channel, platform, or missing templateThe existing package configuration remains in placeomarchy-refresh-pacman validates the target before rendering and copying configuration
The pacman refresh hook fails after configuration is copiedThe package refresh stops and the new configuration may need review before another upgradeThe hook runs before the package transaction and the command cleans up privilege state on exit
AUR access is unavailableInstalled AUR packages remain at their current versionsomarchy-update-aur-pkgs reports the skip and continues the surrounding update path
A mise tool update failsSystem packages and boot checks still complete, but managed tools may remain oldomarchy-update records the optional stage failure and continues to AUR and boot verification
A Qualcomm kernel has no matching SMBIOS device-tree entrysystemd-stub needs a usable board tree for the machineomarchy-update-qualcomm-device-trees adds the uniquely matched running tree as DeviceTree fallback and refreshes the managed list before each boot image build
A Quattro transition fails after it startsThe machine remains between the legacy and package-backed layouts and must not rebootThe exit path marks the upgrade incomplete and directs a safe rerun
Development packages are requested with the stable channelThe transition cannot resolve its package source safelyChannel validation rejects the incompatible combination
The transition cannot confirm root= in the boot entries or generated kernel imagesThe next boot can enter an emergency shellBoot verification blocks automatic or prompted reboot
A factory reset has no installer baseline or supported boot pathThe reset stops before it stages a new rootThe reset requires @factory and a complete boot-reset owner
Factory-reset boot preparation failsThe current system remains the recovery target and the reset does not completeStaged boot state has rollback handling before root activation
A user expects factory reset to securely erase storageOld data can remain recoverable from raw storageThe reset warns that it is not a secure erase

Key files

FileWhy to read it
bin/omarchy-updateDefines the main update lifecycle, terminal session, authorization boundary, stage order, and final reboot gate
bin/omarchy-update-availableDefines how available Omarchy updates are detected
bin/omarchy-update-lockDefines the concurrency boundary, inherited lock descriptor, and diagnostic owner for updates and notifications
bin/omarchy-update-requires-free-spaceDefines the storage check that runs before confirmation and snapshot creation
bin/omarchy-update-confirmDefines the interactive start confirmation
bin/omarchy-update-devDefines updates for an active Omarchy development checkout
bin/omarchy-update-keyringDefines signing-key preparation, fingerprint checks, and trust checks before the package transaction
bin/omarchy-update-system-pkgsDefines the main system package stage and its conflict handoff
bin/omarchy-update-system-pkgs-when-conflictedDefines recovery for unowned files and interactive handling for package conflicts
bin/omarchy-update-pacmanDefines the protected pacman execution path
bin/omarchy-refresh-pacmanDefines channel-specific pacman configuration repair and full package refresh
bin/omarchy-update-aur-pkgsDefines the AUR package stage within the main update authorization window
bin/omarchy-update-miseDefines the optional update of mise-managed tools
bin/omarchy-update-stay-awakeDefines sleep and idle protection for the update and safe release of that protection
bin/omarchy-update-bootDefines post-update boot-chain verification
bin/omarchy-update-firmwareDefines the manual firmware maintenance path
bin/omarchy-update-qualcomm-device-treesDefines the managed Snapdragon device-tree list, machine fallback, and boot-image refresh signal
bin/omarchy-update-orphan-pkgsDefines orphan package review and removal
bin/omarchy-update-analyze-logsDefines update-log checks for initramfs generation warnings, including Apple Silicon behavior
bin/omarchy-update-restartDefines service restart and reboot decisions
bin/omarchy-update-statusDefines compatibility handling for the shell update indicator
bin/omarchy-migrate-notifyDefines login-time notification for pending migrations
bin/omarchy-update-pacman-guardDefines protection against direct system upgrades
bin/omarchy-upgrade-to-quattroDefines the one-way transition from a legacy installation to the package-backed layout
bin/omarchy-system-factory-resetDefines the staged return to the installer baseline and provisioning state
docs/update-process.mdGives the wider update contract and bypass behavior