System Updates & Snapshot Rollback
Linxira OS is a rolling release: security patches become available as soon as upstream publishes them, with no release cycle to wait for. The safety net is automatic too — the system quietly checks for updates every hour, a Timeshift snapshot is created before every pacman transaction, and if anything breaks, picking the snapshot entry in the GRUB menu at reboot rolls you back. This page covers everyday use of that machinery, plus the optional fully-automatic update switch EnableAutoApply.
1. Automatic Checks: On by Default, Hands-Free
No "update manager" needs installing after setup — the check mechanism ships with the linxira-update package and activates itself:
- Enabled at first login: the package ships a systemd user preset (
/usr/lib/systemd/user-preset/80-linxira-update.preset), solinxira-update.timeris enabled automatically the first time you log in. - Cadence: first check 2 minutes after boot, then hourly;
Persistent=truemeans checks missed while powered off are caught up at next boot. - What it does: each run executes
linxira-update --check, which callscheckupdatesunderneath (120 s timeout, hard failures retried once). It only queries — nothing is installed. - Result on disk: the outcome is atomically written to
~/.local/state/linxira-update/status.json. - Three surfaces, one file: the Welcome update card, the tray icon, and desktop notifications (
notify-send) all read that file — no second query is made.
To check once manually:
linxira-update --check Fields of status.json (version 1):
| Field | Meaning |
|---|---|
check_status | ok (check succeeded) / error (check failed) / incomplete (some package's origin could not be determined — never falsely reported as up to date) |
pre_snapshot_id | Optional, string. ID of the snapshot created before an automatic apply (see §5) |
auto_apply | Optional, boolean. Whether a fully-automatic update ran; when refused, a reason is included (see §5) |
2. Ways to Update
One click in Welcome: open Linxira Welcome — the update card shows the check result and starts the update on click. Welcome is only a launcher: what actually runs is linxira-update --launch; there is no second, embedded update logic.
Command line: run linxira-update in a terminal and confirm interactively.
linxira-update Plain pacman is just as safe: sudo pacman -Syu works any time. The auto-snapshot is implemented as a pacman hook that applies to every pacman transaction (see §3), so updates outside linxira-update get the same protection.
Scope and Boundaries
- By default all configured pacman repositories are updated: the signed
[linxira]repo plus Archcore/extra— one full upgrade, no partial upgrades. - AUR and Flatpak are left alone by default; both require explicit opt-in in the config (
EnableAUR/EnableFlatpak). - First-party
linxira-*packages are never handed to AUR helpers — they come only from the signed repository. - If a package's origin cannot be determined, the check is recorded as
incompleterather than falsely claiming "up to date".
3. Snapshots: Automatic Before Every pacman Transaction
The system ships the pacman hook /etc/pacman.d/hooks/linxira-timeshift-autosnap.hook: it fires in the PreTransaction phase, matches Upgrade/Install/Remove on target * — meaning any pacman transaction (a system upgrade, installing a component, even a hand-typed pacman -R) runs timeshift --create --tags O to record the current state before touching the system.
- Near-zero cost: btrfs snapshots are copy-on-write — initially they take almost no space, and afterwards only modified data produces deltas.
- Automatic pruning: the 20 most recent snapshots are kept; older ones are cleaned up without manual attention.
- Soft gating (intentional): if Timeshift is not configured (no
/etc/timeshift/timeshift.json) the hook silently skips; a failed snapshot also does not block the transaction — a non-zero PreTransaction exit would abort the whole transaction, and making a safety net a hard dependency would turn it into a single point of failure.
Scheduled Snapshots
Beyond "before every transaction" there are periodic snapshots on a time/boot schedule. The installer enables them automatically at install time (btrfs mode, 3 daily + 3 per boot); at runtime linxira-config manages them, driving the same idempotent script used by the installer:
linxira-config timeshift status # current configuration
linxira-config timeshift enable # enable (idempotent)
linxira-config timeshift disable # disable 4. When Something Breaks: Reboot and Pick a Snapshot in GRUB
Snapshots are not decorative: the grub-btrfsd service (--timeshift-auto mode) watches Timeshift snapshots and generates matching GRUB boot entries, and grub-btrfs-overlayfs is present in the mkinitcpio HOOKS so snapshot entries boot through a read-only overlay.
Reboot and find the snapshot entries in the GRUB menu (ordered by time — pick the one from before the update).
Read-only verification: a snapshot entry boots the complete system as it was at that moment (kernel, drivers and userspace alike), but read-only and without writing to disk — confirm the problem really came from the update.
Restore once satisfied: after verifying, restore (the Timeshift GUI or sudo timeshift --restore) and the system returns to its pre-update state. Retrying the update later is fine — the next update gets its own automatic snapshot.
linux-lts fallback kernel in the GRUB menu (the dual-kernel safety net); snapshot rollback targets the "a userspace update broke the system" class of failures. How the two layers divide the work is covered in the blog post Btrfs Snapshots & Rollback.5. Fully-Automatic Updates: EnableAutoApply (Off by Default)
This removes even the "click to confirm" step — once updates are found, "snapshot → full upgrade" runs by itself. The switch is off by default; it suits machines on stable networks that should stay current unattended.
How to Enable
Edit ~/.config/linxira-update/linxira-update.conf and add a bare key on its own line (same style as EnableAUR):
EnableAutoApply Remove the line to return to the default (off).
Hard Gates: All Four Must Pass Before the System Is Touched
When --check finds updates and the switch is on, gating runs first and all of the following must hold:
- The root filesystem is btrfs;
/etc/timeshift/timeshift.jsonexists (Timeshift is configured);- the mkinitcpio HOOKS contain
grub-btrfs-overlayfs(snapshots are bootable); - the
grub-btrfsdunit is enabled (snapshots reach the GRUB menu).
Only then: an explicit snapshot is created and verified → a non-interactive full upgrade runs (pacman -Syu --noconfirm) → the snapshot ID is written to pre_snapshot_id in status.json.
Refusal and Fallback
If any gate fails, or the snapshot cannot be created, the automatic apply is refused for that run: behavior stays "check and notify only", and status.json records auto_apply: false with the reason. No snapshot, no system changes — a hard rule with no exception path.
- Non-btrfs is unsupported by construction: server mode, WSL, and ext4 installs are rejected by the gates and stay on manual updates.
- Automatic apply never touches AUR/Flatpak and never performs whitelisted partial upgrades — Arch discipline: upgrade everything or nothing; problems caused by partial upgrades are out of scope.
Command Cheat Sheet
| Command / Location | Purpose |
|---|---|
linxira-update --check | Check for updates now (nothing installed) |
linxira-update | Interactive check and update |
~/.local/state/linxira-update/status.json | Latest check result (read by Welcome, tray and notifications alike) |
linxira-config timeshift status | Show snapshot configuration and status |
linxira-config timeshift enable / disable | Enable / disable scheduled snapshots (3 daily + 3 per boot) |
sudo timeshift --list | List existing snapshots |
sudo timeshift --restore | Restore a snapshot |
A bare EnableAutoApply line in the config | Turn on fully-automatic updates (off by default, hard-gated) |
Related pages: the installation guide (btrfs + Timeshift partitioning scheme), Official Apps (linxira-update and the other first-party tools), Config Hub (the timeshift subcommands), and the blog post Btrfs Snapshots & Rollback (design rationale and drill suggestions).