Skip to content

Packages

Izunim edited this page Feb 27, 2026 · 3 revisions

Packages

Track your installed packages alongside your dotfiles. Synx snapshots your pacman and AUR package lists so you can restore the exact same set on a new machine.

Note: This feature requires pacman (Arch Linux or Arch-based distros). On other systems, synx pkg will show a clear error and all other synx commands continue to work normally.

Commands

Command Description
synx pkg sync Snapshot currently installed packages
synx pkg status Show packages added or removed since last snapshot
synx pkg restore Install missing packages from the saved list
synx pkg list Display the saved package list

How It Works

synx pkg sync captures two lists from pacman:

File Source Contents
~/.config/synx/packages.native pacman -Qqen Explicitly installed repo packages
~/.config/synx/packages.foreign pacman -Qqem Explicitly installed AUR packages

These files are automatically backed up to .synx/ in your dotfiles repo during a regular synx sync, and restored during synx -r.

Typical Workflow

# After setting up your system
synx pkg sync                  # Save current package state

# Later, check what changed
synx pkg status                # Shows added/removed packages

# On a new machine after synx -r
synx pkg restore               # Install all missing packages

Restore Behavior

  • Native packages are installed via sudo pacman -S --needed --noconfirm
  • AUR packages are installed via your AUR helper (paru, yay, trizen, or pikaur — whichever is found first)
  • If no AUR helper is detected, foreign packages are skipped with a warning

Example Output

╭────────────────────────╮
│ 📦 SYNX - Package Sync │
╰────────────────────────╯

→ Capturing installed packages...

─────────────────────────────────────
275 native  │  16 foreign (AUR)
─────────────────────────────────────

    → AUR helper: paru
  ✓ Package state saved

Integration

  • Doctor checks whether a saved package state exists
  • Package lists are backed up during synx and restored during synx -r
  • Works alongside Profiles — each profile can have its own package set. To track packages specifically for a profile, run synx --add packages.native and/or synx --add packages.foreign while the profile is active.

Clone this wiki locally