opkg¶
- ID
opkg- Home page
- 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
- Source
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 |
With |
|---|---|---|
List what’s installed |
|
|
List outdated packages |
|
|
Search for a package |
|
|
Install a package |
|
|
Upgrade one package |
|
|
Upgrade everything |
|
|
Remove a package |
|
|
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 |
|---|---|---|
|
✓ |
|
|
✓ |
|
|
||
|
✓ |
exact and extended search backfilled by |
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
||
|
Selecting and configuring opkg¶
Deselect opkg for a single run with --no-opkg, or persist the choice in your configuration:
[mpm]
opkg = false
Keep it enabled but tune how mpm drives it with a per-manager override:
[mpm.managers.opkg]
timeout = 900
mpm config-template opkg prints every overridable attribute as a ready-to-paste block.
Recipes¶
A few jobs you would otherwise script around opkg, one mpm command each:
Snapshot and clone a machine:
mpm --opkg dump opkg.toml, thenmpm restore opkg.tomlon the next one.Export a compliance SBOM:
mpm --opkg sbom(CycloneDX by default,--spdxfor 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 needs root.
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 againstftp.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); --allow-unsupported-managers opts back in.
Version probe¶
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+)"
Reference traces¶
Raw native outputs captured in the bundled definition: the reference mpm’s parsers were written against. 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
Feed any of these through mpm and the raw output becomes one uniform table, the same shape for every manager: filter it, project columns, or export it (mpm --opkg installed --output json, or csv, toml, yaml), each package carrying a purl and a version comparable across managers.