📦 Package Manager Commands

📋 Preset

Pick a preset to fill in the action and package list. Then choose targets and fine-tune.

⚙️ Action

What you want to do — install, remove, update, search, autoremove, clean cache, pin a version, add a repo, view history, or check for updates.

📦 Packages (space-separated)

Names use the source distro's spelling. The package-name map at the bottom shows 10 common cross-distro renames.

🏠 Source package manager

Where you start. Used as a label in the output; does not affect translations.

🎯 Target package managers

📊 Reference panels

📤 Translated commands

{{ c.label }} ({{ c.distro }})
{{ c.command }}

💡 {{ c.notes }}

No target package managers selected. Pick at least one target on the left.
Enter an action and packages to see translated commands.

⚠️ Warnings

  • • {{ w }}

📌 Notes

  • • {{ n }}

📊 Cross-reference table

Action {{ mgr }}
{{ act }} {{ cellCommand(act, mgr) }}

Full grid of every (action, package manager) pair. Scroll horizontally for the full table.

🗺️ Package-name map

Canonical {{ mgr.label }}
{{ entry.canonical }}
{{ entry.description }}
{{ nameFor(entry, mgr.id) }}

Common cross-distro mismatches — e.g. apache2 vs httpd, python3-pip vs py3-pip.

⚠️

ℹ️ About Package Manager Commands

Why package-manager commands keep biting you

Every Unix-like distribution ships a different package manager — apt on Debian/Ubuntu, dnf (and yum on RHEL 7) on Fedora/RHEL, pacman on Arch, apk on Alpine, zypper on openSUSE, pkg on FreeBSD, brew on macOS (and unofficially on Linux). On top of that there are three universal layers — snap, flatpak, and nix — each with its own CLI grammar. The commands rhyme but they don't match: sudo apt install, sudo dnf install, sudo pacman -S, sudo apk add, brew install. Forget which flag you need and you waste a minute every time you ssh into an unfamiliar host.

This tool translates one action across all 10 managers at once. Pick an action (install, remove, update, search, autoremove, etc.), paste the package names you would use on your familiar distro, choose a source manager, and tick the targets you want commands for. The output panel shows the ready-to-run command for each target plus per-distro quirks. The cross-reference table below shows the full action × manager grid for fast reference.

The ten package managers covered

  • apt (Debian/Ubuntu) — apt(8). Front-end for dpkg. sudo apt install.
  • dnf (Fedora/RHEL 8+) — dnf docs. Replaces yum; rpm-backed.
  • yum (RHEL/CentOS 7) — yum(8). Same UX as dnf for installs.
  • pacman (Arch/Manjaro) — pacman(8). Rolling-release; single-letter flags.
  • apk (Alpine) — apk handbook. musl-based; sub-second install times.
  • zypper (openSUSE) — zypper manual. rpm-backed; pattern-based meta-packages.
  • pkg (FreeBSD) — pkg(8). Binary packages of the FreeBSD ports tree.
  • brew (Homebrew on macOS / Linux) — brew(1). Per-user prefix; no sudo.
  • snap (Canonical Snap) — snap commands. Sandboxed, single store.
  • flatpak — flatpak docs. Sandboxed, multi-remote (Flathub is default).
  • nix — nix-env / nix profile. Functional, reproducible.

Worked translation examples

  • Install nginx — apt: sudo apt install -y nginx; dnf: sudo dnf install -y nginx; pacman: sudo pacman -S --noconfirm nginx; apk: sudo apk add nginx; brew: brew install nginx
  • Update everything — apt: sudo apt update && sudo apt upgrade -y; pacman: sudo pacman -Syu; brew: brew update && brew upgrade
  • Search for curl — apt: apt search curl; pacman: pacman -Ss curl; snap: snap find curl
  • Remove orphans — apt: sudo apt autoremove -y; pacman: sudo pacman -Rns $(pacman -Qdtq); nix: nix-collect-garbage -d

Cross-distro package name pitfalls

  • Apache HTTP Server — apt: apache2; dnf: httpd; pacman: apache; FreeBSD: apache24.
  • Python pip — apt/dnf: python3-pip; pacman: python-pip; apk: py3-pip; FreeBSD: py39-pip (Python-version-prefixed).
  • MySQL client — apt: mysql-client; dnf: mysql; openSUSE: mariadb-client.
  • Docker engine — apt: docker.io (Debian repo) vs the upstream docker-ce repo; dnf: docker-ce.
  • Build toolchain — apt: build-essential; dnf: group @development-tools; pacman: base-devel; apk: build-base; nix: stdenv.

The package-name map below covers ten common cross-distro mismatches with the canonical name in each manager.

Distro-specific quirks worth memorizing

  • Debian/Ubuntu: apt update only refreshes indexes; apt upgrade applies them. Skipping update before install means stale candidates.
  • Arch: pacman -Syu refreshes and upgrades atomically. Splitting into -Sy then later -S pkg is the classic "partial upgrade" footgun.
  • Alpine: apk add -U pkg updates the index inline; lightweight enough that this is normal practice in Dockerfiles.
  • FreeBSD: pkg lock pkg-name is the version-pin equivalent — pkg upgrade respects locks.
  • Homebrew: never use sudo. Homebrew is a per-user prefix (/opt/homebrew on Apple Silicon; /home/linuxbrew on Linux).
  • Snap: requires snapd, which is not pre-installed on RHEL, Fedora, or Arch.
  • Flatpak: requires at least one configured remote — Flathub is the universal default.
  • Nix: nixpkgs attribute paths replace package names: nixpkgs#nginx not nginx.

Limits and practical notes

  • Package names are best effort. The same upstream project is often packaged under different names on each distro (httpd vs apache2 vs apache). Check the in-tool package-name map and your distro's package search before scripting.
  • Distro release matters: RHEL 7 uses yum; RHEL 8+ uses dnf (the same syntax). Debian/Ubuntu may use apt-get in older scripts — the modern apt command is preferred for interactive use.
  • Add-repo, pin-version, and history commands vary sharply across managers — each cell in the cross-reference table includes a note.
  • Translation runs in your browser. The same logic is exposed by the API endpoint below, which uses the shared Module-First TypeScript module.

API Usage Example:

POST /api/tools/linux/package-manager-commands
Content-Type: application/json

{
    "operation": "translate",
    "action": "install",
    "packages": [
        "nginx"
    ],
    "from": "apt",
    "to": [
        "dnf",
        "pacman",
        "brew"
    ]
}
Ready