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 / migration-framework

Migration framework

The Omarchy migration framework moves existing installations to the state expected by a new release. It discovers timestamped repair scripts, runs missing work in order for each user, and records completion so later updates do not repeat it. See the system updates and migrations page for the wider update model and update orchestration and system maintenance for the surrounding update flow.

Migration set

Timestamped migration files

The migration set is the group of shell files in migrations/*.sh. Each file name is a Unix timestamp, so file order also gives the release-transition order. The runner uses the file name as both the migration identity and the completion-marker name.

This model lets a later release carry all past transitions for users who update after several releases. A new migration is added instead of changing an old one. This preserves the path for installations that update late.

Recent additions extend the release path across system cleanup, boot behavior, hardware support, packages, and user applications:

References: bin/omarchy-migrate• L31-45 bin/omarchy-dev-add-migration• L32-39 agents/…/migrations.md• L107-129 migrations/1788009111.sh• L1-89 migrations/1790517230.sh• L1-23 migrations/1791898365.sh• L1-52 migrations/1793464570.sh• L1-38 migrations/1794401477.sh• L1-14 migrations/1794481999.sh• L1-30 migrations/1794593943.sh• L1-36 migrations/1794765111.sh• L1-30 migrations/1794784953.sh• L1-33 migrations/1794844505.sh• L1-33 migrations/1794855305.sh• L1-31 migrations/1794859637.sh• L1-51 migrations/1794929085.sh• L1-30 migrations/1794931275.sh• L1-18 migrations/1794938310.sh• L1-40 migrations/1794988405.sh• L1-6 migrations/1795004054.sh• L1-3 migrations/1795011237.sh• L1-27 migrations/1795023056.sh• L1-5 migrations/1795080474.sh• L1-13 migrations/1795081497.sh• L1-7 migrations/1795081508.sh• L1-25 migrations/1795093470.sh• L1-3 migrations/1795093910.sh• L1-6 migrations/1795099916.sh• L1-9 migrations/1795113315.sh• L1-10 migrations/1791382872.sh• L1-94 migrations/1792504295.sh• L1-15 migrations/1794839007.sh• L1-9 migrations/1794855305.sh• L1-31 migrations/1794864665.sh• L1-11 migrations/1794909082.sh• L1-38 migrations/1795181196.sh• L1-5 migrations/1795191169.sh• L1-5 migrations/1795200237.sh• L1-18 migrations/1795263097.sh• L1-5 migrations/1795274792.sh• L1-36 migrations/1795277141.sh• L1-8 migrations/1795284903.sh• L1-15 migrations/1795285870.sh• L1-30 migrations/1795294173.sh• L1-3 migrations/1795318856.sh• L1-18 migrations/1795337583.sh• L1-11 migrations/1795348551.sh• L1-35 migrations/1795354093.sh• L1-58 migrations/1795354646.sh• L1-3 migrations/1795354955.sh• L1-3 migrations/1795372675.sh• L1-3 migrations/1795376239.sh• L1-10 migrations/1795380483.sh• L1-22 migrations/1795430592.sh• L1-8 migrations/1795441583.sh• L1-23

Per-user completion state

Each user has a marker directory at ~/.local/state/omarchy/migrations/. A missing marker means that the user still needs the matching migration. This state is per user because migrations can change a home directory or session, and a second user can log in after another user updates the machine.

Fresh installs mark the shipped migrations complete while the first user is provisioned. Existing users do not receive those marks. They can therefore pass through the release history and receive the changes that apply to their installation.

References: bin/omarchy-migrate• L31-55 bin/omarchy-provision-user• L19-22 bin/omarchy-provision-user• L123-128 agents/…/migrations.md• L22-32

Migration execution

Pending migration discovery

omarchy-migrate --pending reports migration names whose markers are missing. It exits successfully when work is pending and exits with a non-zero status when no work is pending. This gives update and login services a safe check without changing the installation.

The normal run creates the marker directory, scans the same migration set, and skips files with markers. It passes the Omarchy path to each script so the script can use support files from the active release.

References: bin/omarchy-migrate• L10-33 bin/omarchy-migrate• L47-65 bin/omarchy-migrate• L83-97

Ordered migration run

The runner waits for an active pacman transaction before it starts. This prevents a repair from reading a partly updated installation. If the transaction does not finish within the wait period, the runner leaves the migrations pending for a later login or manual run.

The run is synchronous. A migration must finish successfully before its marker is created, and a failure stops the queue. Later migrations therefore do not claim completion when an earlier release transition has not finished.

The following flow shows how the framework turns a packaged migration set into per-user state.

flowchart TD
    A[Omarchy package update] --> B[Discover timestamped migration files]
    B --> C{Completion marker exists?}
    C -- Yes --> D[Skip migration]
    C -- No --> E[Run migration for current user]
    E --> F{Migration succeeds?}
    F -- Yes --> G[Create per-user marker]
    F -- No --> H[Stop and leave migration pending]
    D --> I[Continue in timestamp order]
    G --> I

References: bin/omarchy-migrate• L68-97 agents/…/migrations.md• L121-135

Idempotent migration behavior

Migrations are one-time repair steps, but the framework can retry after a partial failure and can run for more than one user. Each migration checks the current state before changing it and must be safe when the desired state already exists.

A migration can repair user state and can request a privileged machine-wide repair. The per-user marker stays separate from any machine-wide result. This lets another user finish their own part without repeating completed privileged work. Migrations limit changes to known Omarchy-owned state and preserve user choices where possible.

The new migrations apply this rule across several kinds of state:

References: agents/…/migrations.md• L5-7 agents/…/migrations.md• L17-32 migrations/1788009111.sh• L3-89 migrations/1790517230.sh• L3-23 migrations/1791898365.sh• L3-52 migrations/1793464570.sh• L10-38 migrations/1794401477.sh• L1-14 migrations/1794481999.sh• L4-30 migrations/1794593943.sh• L9-36 migrations/1794765111.sh• L4-30 migrations/1794784953.sh• L9-33 migrations/1794844505.sh• L10-33 migrations/1794855305.sh• L8-31 migrations/1794859637.sh• L6-51 migrations/1794929085.sh• L4-30 migrations/1794931275.sh• L3-18 migrations/1794938310.sh• L3-40 migrations/1794988405.sh• L1-6 migrations/1795004054.sh• L1-3 migrations/1795011237.sh• L5-27 migrations/1795023056.sh• L1-5 migrations/1795080474.sh• L1-13 migrations/1795081497.sh• L1-7 migrations/1795081508.sh• L1-25 migrations/1795093470.sh• L1-3 migrations/1795093910.sh• L1-6 migrations/1795099916.sh• L1-9 migrations/1795113315.sh• L1-10 migrations/1791382872.sh• L20-94 migrations/1792504295.sh• L3-15 migrations/1794839007.sh• L3-9 migrations/1794909082.sh• L11-38 migrations/1795200237.sh• L6-18 migrations/1795274792.sh• L13-36 migrations/1795277141.sh• L3-8 migrations/1795284903.sh• L5-15 migrations/1795285870.sh• L14-30 migrations/1795318856.sh• L3-18 migrations/1795337583.sh• L3-11 migrations/1795348551.sh• L19-35 migrations/1795354093.sh• L8-58 migrations/1795430592.sh• L3-8 migrations/1795441583.sh• L3-23

Migration entry points

Blessed update path

omarchy update runs migrations after the system package transaction completes. The package update comes first because migration scripts can depend on files and tools shipped by the new release. The migration run stays in the visible update terminal and shares the update authorization context.

After migrations finish, the update continues with cleanup, status refresh, restart checks, hooks, and other maintenance. A failed package update prevents migration work from running against the old system state.

References: bin/omarchy-update• L120-149 docs/update-process.md• L117-168 test/…/update-sequence-test.sh• L97-108

Login-time notification

Every graphical login starts omarchy-migrate-notify.service after graphical-session.target. The notifier checks the current user’s pending list and shows an actionable notification only when work remains. Selecting it opens a terminal that runs omarchy-migrate.

The notifier does not run migrations in the background. It stays quiet while the user’s update lock is held, then checks the lock again after waiting. This avoids a duplicate prompt while the visible update is already applying the same migrations.

References: default/…/omarchy-migrate-notify.service• L1-20 bin/omarchy-migrate-notify• L7-44 install/…/enable-user-units.sh• L14-22

Manual and direct package paths

Users can run omarchy-migrate directly. Completed files are skipped, so a retry is the normal recovery path after a failed migration or interrupted update.

If a user upgrades packages directly with pacman, the next graphical login provides the pending-migration notification. This also covers additional users whose per-user markers are still missing.

References: agents/…/migrations.md• L48-86 docs/update-process.md• L170-237 bin/omarchy-migrate-notify• L46-60

Release transition boundary

Dedicated major-release upgrade

The Omarchy 4 transition uses omarchy-upgrade-to-quattro for work that must cross the old installer and package layout. That command performs its release-specific transition first, then runs the normal migration runner as the logged-in Omarchy user and checks that no migration remains pending before reboot.

This boundary keeps old package-layout work in the major-release upgrade. Persistent defects on systems that already crossed the boundary belong in a migration.

References: bin/omarchy-upgrade-to-quattro• L1195-1210 bin/omarchy-upgrade-to-quattro• L2358-2385 agents/…/migrations.md• L168-172

Change checklist

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

  • Keep the migration file name, completion-marker name, and execution order aligned.
  • Preserve package-before-migration order in omarchy-update.
  • Keep per-user markers separate from machine-wide repair markers.
  • Gate changes on known Omarchy-owned state and preserve user or administrator edits.
  • Leave a migration pending when a required package payload or rebuild result is absent.
  • Keep the login notifier from prompting while omarchy update holds the update lock.
  • Keep dependent migrations in timestamp order when one changes data used by the next.
  • For boot changes, keep the old boot option available and create machine-wide completion state only after the new entry is verified.
  • For hardware-specific work, keep platform, model, and device-tree checks narrow. Mark reboot-required state only when the new package or boot image needs it.
  • For package transitions, remove only the named obsolete package or repository and restore dependencies that an earlier removal may have taken with it.
  • For user defaults, write only missing or known retired choices. Preserve symlinks and explicit application choices.
  • For shortcut migrations, change only the exact legacy binding created by an earlier migration. Leave hand-written bindings alone.
  • For browser integration, require the target browser or its existing extension payload before copying policy or extension state.
  • For theme refreshes, require the current theme to exist before changing its icons or staged assets.
  • For launcher changes, add only the intended entries so user removals remain effective.
  • For hardware services, gate setup on the matching hardware and make repeat starts safe for later users.
  • For initramfs and boot-entry repairs, keep the pending state until the rebuild result is verified, not only until the setup file is written.
  • For desktop migrations, match only Omarchy-generated overrides before removing or replacing them.
  • For application launchers and packages, require the related installed app or signed-in account before adding integration.
  • For tool migrations, wait for the settings payload before removing old wrappers or changing a package source. Preserve user-managed tool declarations.
  • For shell layout migrations, preserve linked files and leave invalid JSON unchanged so the user can repair it before retrying.
  • For hardware migrations that share a rebuild helper, keep each machine-wide marker tied to its own verified rebuild.

Important failure modes

TriggerConsequenceGuard
A migration exits non-zeroIts marker is not created and later migrations do not run.Run migrations synchronously and create the marker only after success.
Pacman still holds its database lockThe work stays pending.Retry at the next login or run omarchy-migrate after pacman exits.
A migration runs before the package update finishesIt can inspect or repair state against the old release.Place omarchy-migrate after system package updates.
A boot-image command reports a failed kernel but exits successfullyRequired drivers, firmware, or device-tree data can be absent while migration state looks complete.Inspect the rebuild result and keep the machine-wide marker absent until all required images build.
A hardware migration runs without a matching deviceAn unrelated system can receive an unwanted package, boot, audio, firmware, GPU, or power-profile change.Require the exact platform, model, or device-tree match.
A package removal also removes needed dependenciesCore applications or printing can fail after a retired package is removed.Remove only named packages and restore required dependencies in a follow-up migration.
A repository is removed before replacement packages are availableT2 packages can remain tied to the old source or fail to reinstall.Verify every installed replacement package is available and installed before dropping the old repository.
An existing user config or symlink is treated as a missing defaultLocal settings or a dotfiles-managed file can be overwritten.Preserve links and explicit choices. Seed only absent files or replace known old defaults.
A printer queue with jobs is deleted during backend removalUser print jobs can be lost.Reject discovery queues and delete only empty queues. Leave queues with jobs for the user.
A legacy shortcut is changed without checking its exact generated formA personal binding can be altered or a new shortcut can conflict with it.Match and replace only the exact line written by the earlier migration.
A boot menu config cannot be read because the boot partition is protectedThe migration can be marked complete without changing the menu or can fail before authorization.Authorize the protected read and leave the migration pending when access is denied.
Herdr config is symlink-managed, user-configured, or unreadableA user’s config layout or update choice can be changed.Skip symlink-managed files and preserve set or unreadable update sections.
A launcher migration restores every packaged applicationApplications that the user removed can return to the launcher.Add only the intended entries and require the related app, engine, or account state.
A theme refresh runs without a current themeThe user’s icons or staged backgrounds are not refreshed for that migration.Refresh only an existing current theme and let a later theme selection provide its assets.
Qualcomm or GB10 setup runs on unrelated hardwareAn unrelated system can receive platform-specific boot, browser, kernel, or memory settings.Gate the setup on the matching hardware check.
The old Direct Boot entry is removed without checking the EFI systemA non-EFI or Apple system can receive an unsupported boot change.Require EFI support, the tool, and a non-Apple platform before removing the entry.
A migration removes a mise wrapper before the settings package supplies its replacementA tool can disappear or its command can fail for the user.Check for the shipped declaration first and create the replacement shim before removing the exact legacy wrapper.
A migration treats a user-managed mise install as Omarchy stateA pinned or custom tool version can be removed.Match shipped wrapper content and preserve source-backed mise installs.
A shell layout file is invalid or linked through dotfilesThe bar can lose entries or the user's source file can be replaced.Write through links and leave parse failures pending.
A hardware setup writes boot data but its rebuild is incompleteThe running system reports the repair while the next boot still lacks it.Use a machine-wide pending or done marker and verify every rebuild result before completion.
A required settings package or service unit is not yet installedThe migration can fail or mark a feature complete without its release payload.Exit pending and retry after the package delivers the declaration or unit.

Key files

FileWhy to read it
bin/omarchy-migratePrimary discovery, ordering, pacman wait, and completion-marker behavior.
bin/omarchy-updatePosition of migrations in the update lifecycle.
bin/omarchy-migrate-notifyLogin-time pending check and user recovery path.
default/systemd/user/omarchy-migrate-notify.serviceLogin trigger and ordering for migration notifications.
bin/omarchy-provision-userFirst-install handling of shipped migration markers.
bin/omarchy-dev-add-migrationTimestamp naming model for new migrations.
bin/omarchy-upgrade-to-quattroMajor-release transition boundary and post-upgrade verification.
migrations/1788009111.sh, migrations/1794401477.shSafe printer-backend removal and dependency restoration.
migrations/1790517230.sh, migrations/1791898365.shDGX Spark boot repair and user-preserving boot-menu changes.
migrations/1793464570.sh, migrations/1794481999.sh, migrations/1794765111.sh, migrations/1794784953.sh, migrations/1794929085.shDevice-specific boot-image transitions that verify rebuilt images before completion.
migrations/1794593943.sh, migrations/1794844505.sh, migrations/1794855305.sh, migrations/1795011237.sh, migrations/1795081497.sh, migrations/1795081508.sh, migrations/1795099916.shHardware-scoped kernel, device-tree, EFI, memory, browser, and GPU boot changes.
migrations/1794859637.shSafe migration of T2 packages between repositories.
migrations/1794931275.sh, migrations/1794988405.sh, migrations/1795004054.sh, migrations/1795023056.sh, migrations/1795080474.sh, migrations/1795093470.sh, migrations/1795093910.sh, migrations/1795113315.shExisting-user application, launcher, skill, theme-package, and current-theme transitions.
migrations/1794938310.shPreservation of user-managed Herdr configuration during a default change.
migrations/1791382872.sh, migrations/1792504295.sh, migrations/1795318856.shMigration from legacy mise tools to release-managed shims and packages.
migrations/1794839007.sh, migrations/1795200237.sh, migrations/1795277141.sh, migrations/1795380483.shLocal-model launcher and shell-layout transitions.
migrations/1794864665.sh, migrations/1794909082.sh, migrations/1795274792.sh, migrations/1795284903.sh, migrations/1795285870.sh, migrations/1795337583.sh, migrations/1795348551.sh, migrations/1795354093.sh, migrations/1795430592.shHardware-scoped support and verified boot or service repairs.
migrations/1795354646.sh, migrations/1795354955.sh, migrations/1795441583.shAdoption of packages and services that became part of the base system.
agents/…/migrations.mdAuthoring contract, scope, and retry rules.
docs/update-process.mdRelationship between migrations, package updates, direct pacman use, and login recovery.