opkg

ID

opkg

Links

Documentation · Repository

Version requirement

>= 0.2

Platforms

🅱️ BSD · 🐧 Linux · ⨂ Unix

Operations

installed · outdated · search · install · upgrade · upgrade_all · remove · sync

purl types

pkg:openwrt/ · pkg:opkg/

CLI name

opkg

Issues and PRs

📦 manager: dpkg-based

Source

opkg.toml

opkg is the lightweight package manager of embedded Linux distributions (OpenWrt, Yocto).

opkg has no search verb, so mpm lists the whole catalog (opkg list, whose rows are name - version - description) and refilters it against the query; the description column is dropped, since the definition DSL captures only ids and versions. The other listings are name - version (list-installed) and name - installed - latest (list-upgradable) rows. No operation is marked sudo: opkg’s embedded targets run as root.

What mpm adds to opkg

Through mpm, opkg gains --exact and --extended search, to narrow to exact names or match descriptions.

Bigger still, mpm reaches across every manager at once: mpm installed and mpm outdated cover opkg alongside every other manager you run in one table, mpm upgrade --all updates them together, and mpm sbom exports the whole machine as one bill of materials.

Every mpm command also gains --dry-run and --plan previews, cross-scheme version comparison and purl identifiers. See manager augmentations for how each one is built.

Your opkg commands, in mpm

You already know opkg: each operation maps one-to-one onto mpm, in an interface shared by every manager.

To…

With opkg

With mpm

List what’s installed

opkg list-installed

mpm --opkg installed

List outdated packages

opkg list-upgradable

mpm --opkg outdated

Search for a package

opkg list

mpm --opkg search list

Install a package

opkg install <package_id>

mpm install pkg:opkg/<package_id>

Upgrade one package

opkg upgrade <package_id>

mpm --opkg upgrade <package_id>

Upgrade everything

opkg upgrade

mpm --opkg upgrade --all

Remove a package

opkg remove <package_id>

mpm remove pkg:opkg/<package_id>

Prefix any command above with --dry-run to simulate the underlying manager calls without touching the system: the safe way to watch what mpm would do before trusting it.

Operations

Operation

Supported

Notes

installed

✅

outdated

✅

orphans

search

✅

Exact and extended search backfilled by mpm.

install

✅

upgrade

✅

upgrade_all

✅

remove

✅

sync

✅

cleanup

doctor

Configuration

  • Ignore opkg on the mpm CLI by passing the --no-opkg option.

  • Ignore it for every run in your configuration:

    [mpm]
    opkg = false
    
  • Raise the timeout of all opkg calls:

    [mpm.overrides.opkg]
    timeout = 900
    
  • Run mpm config-template opkg to print all overridable settings for your configuration file:

    [mpm.overrides.opkg]
    cli_names = [
        "opkg",
    ]
    cli_search_path = []
    dry_run = false
    ignore_auto_updates = true
    plan = false
    post_args = []
    pre_args = []
    pre_cmds = []
    requirement = ">=0.2.0"
    stop_on_error = false
    unmaintained = false
    version_cli_options = [
        "--version",
    ]
    version_regexes = [
        "opkg\\s+version\\s+(?P<version>\\S+)",
    ]
    

Recipes

A few jobs you would otherwise script around opkg, one mpm command each:

  • Snapshot and clone a machine: mpm --opkg dump opkg.toml, then mpm restore opkg.toml on the next one.

  • Export a compliance SBOM: mpm --opkg sbom (CycloneDX by default, --spdx for SPDX).

Privilege escalation

mpm runs this manager as the current user and never prepends sudo by default. Flip the policy for its privileged operations with --sudo or the per-manager sudo override.

None of its operations is privileged.

See privilege escalation for the full policy.

Cooldown

State of opkg’s release-age gating, from the cooldown support table:

Status: ❌ None

A cooldown only pays off where a compromised release can be withdrawn while the clock runs, and can only be emulated where the registry dates its releases. From the retraction table:

  • Registry: Distro binary archives (pkg:deb, pkg:rpm, pkg:alpm, pkg:apk)

  • Retraction: Index revert: removal is an archive operation and the mirror is rebuilt without the package. Debian, for one, requires filing an RM: bug against ftp.debian.org (developers-reference)

  • Publish date: ❌ the version string is the distro maintainer’s build, carrying no upstream publication date

With --cooldown set, mpm skips this manager’s install and upgrade operations rather than run them unguarded (fail-closed); --cooldown best-effort opts back in.

Reference traces

A collection of raw native outputs captured from the manager’s own CLI and recorded in the bundled definition. If you know opkg well and a transcript below looks wrong, or a newer release changed its output format, report it.

$ opkg list-installed
3rd-party-feed-configs - 1.1-r0
aio-grab - 1.0+git71+c79e264-r0
$ opkg list-upgradable
openpli-bootlogo - 20190717-r0 - 20190718-r0
enigma2-hotplug - 2.7+git1720+55c6b34-r0 - 2.7+git1722+daf2f52-r0
$ opkg list
bash - 5.0-r0 - An sh-compatible command language interpreter
busybox - 1.31.0-r0 - Tiny versions of many common UNIX utilities

Version check

The version is probed by running:

$ opkg --version
opkg version 0.3.6 (libsolv 0.7.5)

and extracted with:

r"opkg\s+version\s+(?P<version>\S+)"

Changelog

  • 6.4.0 (2026-04-27)

    • Add remove operation. Closes #1775.