Skip to main content

Package Management

Complete Guide to Searching, Installing, and Managing Packages

OMG provides unified package management for official repositories and AUR on Arch Linux, with experimental Debian/Ubuntu support.


๐ŸŽฏ Overviewโ€‹

OMG's package management features:

  • 22x faster searches than pacman (6ms vs 133ms)
  • Unified AUR integration โ€” no separate AUR helper needed
  • Security grading โ€” packages rated before installation
  • Policy enforcement โ€” organization-wide installation rules
  • Transaction history โ€” full audit trail with rollback

# Search all repositories (official + AUR)
omg search vim

# Limit results
omg search vim --limit 10

# Search AUR only
omg search -a visual-studio-code

# Search official only
omg search -o firefox
# Interactive mode โ€” select packages to install
omg search browser -i

Interactive mode provides:

  • Fuzzy matching with arrow key navigation
  • Multi-select with space bar
  • Package descriptions inline
  • Security grades displayed

Search Performanceโ€‹

ModeLatencyNotes
With daemon (cached)~6msInstant feel
With daemon (fresh)~200msStill fast
Without daemon~500msDirect libalpm

Fuzzy Matchingโ€‹

OMG uses Nucleo for intelligent fuzzy matching:

omg search frfx
# Finds: firefox, firefox-developer-edition

omg search vsc
# Finds: visual-studio-code-bin, vscodium-bin

๐Ÿ“ฆ Package Installationโ€‹

Install Packagesโ€‹

# Install single package
omg install firefox

# Install multiple packages
omg install firefox chromium brave-bin

# Install AUR package (auto-detected)
omg install visual-studio-code-bin

# Install as dependency
omg install --asdeps libfoo

Installation Lifecycleโ€‹

  1. Security Analysis: Every package is evaluated against the system's security criteria and assigned a grade.
  2. Policy Validation: The system checks the package against defined rules, ensuring it meets organizational or user-set standards.
  3. Conflict Resolution: Dependencies are mapped and resolved, ensuring that all required components are available.
  4. Download & Integrity: Artifacts are retrieved over secure channels and verified using cryptographic signatures and hashes.
  5. Integration: Official packages are integrated through the system backend, while custom sources are prepared and deployed efficiently.
  6. Audit Recording: The entire transaction is logged to the history database for future reference or rollback.

AUR Build Optionsโ€‹

Configure in ~/.config/omg/config.toml:

[aur]
# Parallel build jobs
build_concurrency = 8

# makepkg flags
makeflags = "-j8"

# Cache built packages
cache_builds = true

# Use ccache for C/C++
enable_ccache = true

# Use sccache for Rust
enable_sccache = false

๐Ÿ—‘๏ธ Package Removalโ€‹

Remove Packagesโ€‹

# Remove single package
omg remove firefox

# Remove with orphaned dependencies
omg remove firefox -r

# Remove multiple packages
omg remove pkg1 pkg2 pkg3

Safety Featuresโ€‹

  • Confirms before removing packages
  • Won't remove system dependencies
  • Warns about dependent packages

๐Ÿ”„ System Updatesโ€‹

Update Packagesโ€‹

# Update everything (official + AUR)
omg update

# Check for updates without installing
omg update --check

Update Flowโ€‹

  1. Database Sync โ€” Fresh package lists
  2. Official Updates โ€” Via pacman
  3. AUR Updates โ€” Parallel builds
  4. History Recording โ€” All changes logged

Selective Updatesโ€‹

# Update specific package
omg install firefox # Re-installing updates if newer

# Update official only (traditional pacman)
sudo pacman -Syu

โ„น๏ธ Package Informationโ€‹

Get Package Detailsโ€‹

omg info firefox

Output includes:

  • Name and version
  • Description
  • Repository (official/AUR)
  • Dependencies and optional dependencies
  • Installed files count
  • Security grade
  • Installation status

Performanceโ€‹

ModeLatency
With daemon (cached)~6.5ms
Without daemon~150ms

๐Ÿ“‹ Package Listingsโ€‹

Explicitly Installed Packagesโ€‹

# List all explicit packages
omg explicit

# Count only
omg explicit --count

System Statusโ€‹

omg status

Shows:

  • Total packages
  • Explicit packages
  • Orphaned packages
  • Updates available
  • Vulnerabilities

๐Ÿงน Cleanupโ€‹

Clean Cachesโ€‹

# Remove orphaned packages
omg clean --orphans

# Clear package cache
omg clean --cache

# Clear AUR build cache
omg clean --aur

# Full cleanup
omg clean --all

Sync Databasesโ€‹

omg sync

๐Ÿ” Security Featuresโ€‹

Security Gradesโ€‹

Every package is assigned a security grade:

GradeMeaningExamples
LOCKEDSLSA Level 3 + PGPglibc, linux, pacman
VERIFIEDPGP signature verifiedOfficial repo packages
COMMUNITYAUR/unsignedAUR packages
RISKKnown vulnerabilitiesCVE-affected packages

Policy Enforcementโ€‹

Create ~/.config/omg/policy.toml:

# Minimum grade required
minimum_grade = "Verified"

# Allow AUR packages
allow_aur = true

# Require PGP signatures
require_pgp = false

# Allowed licenses (SPDX)
allowed_licenses = ["Apache-2.0", "MIT"]

# Banned packages
banned_packages = ["some-bad-pkg"]

Vulnerability Checkingโ€‹

OMG checks installed packages against:

  • Arch Linux Security Advisory (ALSA)
  • OSV.dev global database

Run audit:

omg audit

๐Ÿ“œ Transaction Historyโ€‹

View Historyโ€‹

# Recent transactions
omg history

# Last 5 transactions
omg history --limit 5

Rollbackโ€‹

# Interactive rollback
omg rollback

# Rollback specific transaction
omg rollback <transaction-id>

Rollback Limitations:

  • Official packages only (AUR rollback planned)
  • Requires old packages in cache
  • May have dependency conflicts

๐ŸŒ Mirror Managementโ€‹

Pacman Mirrorsโ€‹

OMG uses system pacman mirrors. Configure in /etc/pacman.d/mirrorlist.

AUR Sourceโ€‹

Default AUR endpoint: https://aur.archlinux.org


๐Ÿ’จ Performance Tipsโ€‹

1. Use the Daemonโ€‹

# Start daemon for cache
omg daemon

# Verify it's running
omg status

2. Use omg-fast for Scriptsโ€‹

# Ultra-fast package count
omg-fast ec # Explicit count
omg-fast tc # Total count

3. Batch Operationsโ€‹

# Install multiple at once
omg install pkg1 pkg2 pkg3

# Rather than individual commands
omg install pkg1
omg install pkg2
omg install pkg3

๐Ÿง Platform Supportโ€‹

Arch Linux (Full Support)โ€‹

  • Official repositories via libalpm
  • AUR with full build support
  • All features available

Debian/Ubuntu (Experimental)โ€‹

Build with Debian feature:

cargo build --release --features debian

Requires libapt-pkg-dev:

sudo apt install libapt-pkg-dev

Supported commands:

  • omg search
  • omg info
  • omg install
  • omg remove
  • omg update
  • omg explicit

Note: No AUR equivalent on Debian.


๐Ÿ”ง Troubleshootingโ€‹

Search Returns Nothingโ€‹

# Sync databases
omg sync

# Restart daemon
pkill omgd && omg daemon

# Try direct
pacman -Ss <query>

AUR Build Failsโ€‹

# Check base-devel
pacman -Q base-devel

# Clear cache and retry
omg clean --aur
omg install <package>

# Check logs
cat ~/.cache/omg/logs/*.log

Permission Deniedโ€‹

# AUR builds shouldn't need sudo
# Official installs prompt for sudo

# If socket issues
ls -la $XDG_RUNTIME_DIR/omg.sock

๐Ÿ“š See Alsoโ€‹