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
๐ Package Searchโ
Basic Searchโ
# 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 Searchโ
# 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โ
| Mode | Latency | Notes |
|---|---|---|
| With daemon (cached) | ~6ms | Instant feel |
| With daemon (fresh) | ~200ms | Still fast |
| Without daemon | ~500ms | Direct 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โ
- Security Analysis: Every package is evaluated against the system's security criteria and assigned a grade.
- Policy Validation: The system checks the package against defined rules, ensuring it meets organizational or user-set standards.
- Conflict Resolution: Dependencies are mapped and resolved, ensuring that all required components are available.
- Download & Integrity: Artifacts are retrieved over secure channels and verified using cryptographic signatures and hashes.
- Integration: Official packages are integrated through the system backend, while custom sources are prepared and deployed efficiently.
- 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โ
- Database Sync โ Fresh package lists
- Official Updates โ Via pacman
- AUR Updates โ Parallel builds
- 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โ
| Mode | Latency |
|---|---|
| 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:
| Grade | Meaning | Examples |
|---|---|---|
| LOCKED | SLSA Level 3 + PGP | glibc, linux, pacman |
| VERIFIED | PGP signature verified | Official repo packages |
| COMMUNITY | AUR/unsigned | AUR packages |
| RISK | Known vulnerabilities | CVE-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 searchomg infoomg installomg removeomg updateomg 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โ
- CLI Reference โ All package commands
- Security & Compliance โ Security grading details
- Configuration โ Policy configuration
- History & Rollback โ Transaction management