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:
- Existing installations remove automatic printer discovery while preserving active print jobs. They also restore Ghostscript when an earlier package cleanup removed it as an unused dependency (migrations/1788009111.sh, migrations/1794401477.sh).
- Boot transitions make Limine start faster and quieter while preserving an explicit user timeout. They also repair initramfs module rules and refresh boot images for affected T2, Qualcomm, HP, Lenovo, ASUS, AMD, and GB10 systems. The DGX Spark path also removes the old EFI route and rebuilds without a UKI to avoid a firmware delay (migrations/1790517230.sh, migrations/1791898365.sh, migrations/1793464570.sh, migrations/1794481999.sh, migrations/1794593943.sh, migrations/1794765111.sh, migrations/1794784953.sh, migrations/1794855305.sh, migrations/1794929085.sh, migrations/1795011237.sh, migrations/1795081508.sh).
- Qualcomm and GB10 systems receive device-specific boot or memory settings. T2 systems move their packages from the old repository to Omarchy's repository. These transitions verify the required package or rebuild before they record completion (migrations/1794844505.sh, migrations/1794859637.sh, migrations/1795081497.sh).
- Existing users gain Fantasi, Game Vibes, theme loops, refreshed current themes, and renamed agent skills when the related state is present. Browser support is restored on Qualcomm laptops after a browser refresh removes its camera and video settings (migrations/1795023056.sh, migrations/1795080474.sh, migrations/1795093470.sh, migrations/1795093910.sh, migrations/1795099916.sh, migrations/1795113315.sh).
- Herdr stops its own update check only when its config has no user-selected update settings. Symlink-managed or unreadable configs stay unchanged (migrations/1794938310.sh).
- Existing users move from shipped mise wrappers to lazy tool shims and receive newer coding-agent tools only when the settings package provides their declarations. Pi moves to a package without removing a user-managed mise install (migrations/1791382872.sh, migrations/1792504295.sh, migrations/1795318856.sh).
- Local-model integration follows the current desktop design. Migrations add or remove model launchers and update the bar only when the local-model engine or existing shell state supports the change (migrations/1794839007.sh, migrations/1795200237.sh, migrations/1795277141.sh, migrations/1795380483.sh).
- New hardware transitions add support for Surface, Snapdragon, Intel, HP, Apple, and Lenovo systems. They install only on matching hardware and rebuild boot data when the change takes effect at the next boot (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.sh).
- Existing installations receive packages and services that became part of the base system, including local-model support, factory-reset support, and pre-generated shutdown data. These migrations wait for the package or service payload when it is not yet available (migrations/1795354646.sh, migrations/1795354955.sh, migrations/1795441583.sh).
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:
- Hardware checks limit boot, firmware, audio, Wi-Fi, suspend, GPU memory, and power-profile work to exact platforms, models, or device trees. Boot-image work stays pending when the rebuild output reports a failed kernel, even if the rebuild command exits successfully. Hardware changes set reboot-required state when the new device data or service needs the next boot (migrations/1790517230.sh, migrations/1793464570.sh, migrations/1794481999.sh, migrations/1794593943.sh, migrations/1794765111.sh, migrations/1794784953.sh, migrations/1794844505.sh, migrations/1794855305.sh, migrations/1794929085.sh, migrations/1795011237.sh, migrations/1795081497.sh, migrations/1795081508.sh, migrations/1795099916.sh).
- Package transitions add only missing support and remove only named packages or repository entries. They verify replacement packages before removing the old T2 repository and restore dependencies that an earlier removal may have taken with it (migrations/1788009111.sh, migrations/1794401477.sh, migrations/1794859637.sh, migrations/1795023056.sh, migrations/1795093470.sh).
- User configuration changes preserve explicit choices, symlink-managed files, and unreadable configs. They change only missing settings or known Omarchy-generated state (migrations/1791898365.sh, migrations/1794938310.sh).
- Browser, agent, theme, and application changes act only when the related application, engine, account, or current theme exists. They add missing support without restoring applications or launchers that users removed (migrations/1794839007.sh, migrations/1794931275.sh, migrations/1794988405.sh, migrations/1795004054.sh, migrations/1795023056.sh, migrations/1795080474.sh, migrations/1795093470.sh, migrations/1795093910.sh, migrations/1795099916.sh, migrations/1795113315.sh).
- Tool migrations replace only known Omarchy-generated wrappers or declarations. They wait for settings supplied by the release, preserve user-selected versions and mise configuration, and avoid installing optional tools after a user opts out of preinstalls (migrations/1791382872.sh, migrations/1792504295.sh, migrations/1795318856.sh).
- Desktop configuration migrations change only recognized Omarchy entries. They preserve dotfiles-managed links and leave invalid JSON unchanged so the migration can be retried (migrations/1795200237.sh, migrations/1795380483.sh).
- Machine-wide rebuild markers are written only after the new boot image is verified. A pending rebuild marker or a missing completion marker causes a later user or retry to finish the work instead of treating setup alone as success (migrations/1790517230.sh, migrations/1793464570.sh, migrations/1794481999.sh, migrations/1794593943.sh, migrations/1794765111.sh, migrations/1794784953.sh, migrations/1794844505.sh, migrations/1794855305.sh, migrations/1794909082.sh, migrations/1794929085.sh, migrations/1795011237.sh, migrations/1795081508.sh, migrations/1795285870.sh, migrations/1795348551.sh, migrations/1795354093.sh).
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 updateholds 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
| Trigger | Consequence | Guard |
|---|---|---|
| A migration exits non-zero | Its 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 lock | The work stays pending. | Retry at the next login or run omarchy-migrate after pacman exits. |
| A migration runs before the package update finishes | It 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 successfully | Required 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 device | An 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 dependencies | Core 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 available | T2 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 default | Local 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 removal | User 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 form | A 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 protected | The 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 unreadable | A 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 application | Applications 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 theme | The 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 hardware | An 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 system | A 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 replacement | A 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 state | A 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 dotfiles | The 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 incomplete | The 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 installed | The 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
| File | Why to read it |
|---|---|
bin/omarchy-migrate | Primary discovery, ordering, pacman wait, and completion-marker behavior. |
bin/omarchy-update | Position of migrations in the update lifecycle. |
bin/omarchy-migrate-notify | Login-time pending check and user recovery path. |
default/systemd/user/omarchy-migrate-notify.service | Login trigger and ordering for migration notifications. |
bin/omarchy-provision-user | First-install handling of shipped migration markers. |
bin/omarchy-dev-add-migration | Timestamp naming model for new migrations. |
bin/omarchy-upgrade-to-quattro | Major-release transition boundary and post-upgrade verification. |
| migrations/1788009111.sh, migrations/1794401477.sh | Safe printer-backend removal and dependency restoration. |
| migrations/1790517230.sh, migrations/1791898365.sh | DGX Spark boot repair and user-preserving boot-menu changes. |
| migrations/1793464570.sh, migrations/1794481999.sh, migrations/1794765111.sh, migrations/1794784953.sh, migrations/1794929085.sh | Device-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.sh | Hardware-scoped kernel, device-tree, EFI, memory, browser, and GPU boot changes. |
| migrations/1794859637.sh | Safe 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.sh | Existing-user application, launcher, skill, theme-package, and current-theme transitions. |
| migrations/1794938310.sh | Preservation of user-managed Herdr configuration during a default change. |
| migrations/1791382872.sh, migrations/1792504295.sh, migrations/1795318856.sh | Migration from legacy mise tools to release-managed shims and packages. |
| migrations/1794839007.sh, migrations/1795200237.sh, migrations/1795277141.sh, migrations/1795380483.sh | Local-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.sh | Hardware-scoped support and verified boot or service repairs. |
| migrations/1795354646.sh, migrations/1795354955.sh, migrations/1795441583.sh | Adoption of packages and services that became part of the base system. |
| agents/…/migrations.md | Authoring contract, scope, and retry rules. |
| docs/update-process.md | Relationship between migrations, package updates, direct pacman use, and login recovery. |