GNU Octave pkg¶
- ID
octave- Links
- Version requirement
>= 7.1
- Platforms
🅱️ BSD · 🐧 Linux · 🍎 macOS · ⨂ Unix · 🪟 Windows
- Operations
installed·outdated·search·install·upgrade·upgrade_all·remove- purl types
pkg:octave/- CLI names (lookup order)
octave-cli·octave- Every call
octave-cli --no-init-file --quiet --no-window-system <command>- Issues and PRs
- Source
GNU Octave’s own package manager, the pkg command, driven headlessly
(https://octave.org).
A package is a name from the Octave Packages index (https://packages.octave.org),
and every verb takes that name. Each operation is one octave-cli --eval call,
so the listings print a format chosen here instead of the table of pkg list.
The inventory holds the packages of the user and the packages installed for all
users, the user’s copy winning when both hold one name, as in pkg list. A
regular user cannot remove a package installed for all users, like one from a
Debian octave-* package: pkg refuses it as “a global package”.
Parsing notes, verified against GNU Octave 11.1.0 on Ubuntu 26.04:
--no-init-fileskips~/.octavercand the.octavercof the working directory, which Octave reads otherwise and which can print into the output being parsed. Octave 10 renamed the option--no-init-userand still accepts the old name, which is the one older releases know.pkghas no read-only update check:pkg updateinstalls what it finds.outdatedreads the index itself and applies the rule ofpkg update,compare_versionsagainst the first, most recent, version of the entry.--evalrefuses trailing arguments (“–eval “CODE” and script file are mutually exclusive options”), so the package name goes into the code.Removing or updating a package that is not installed only warns, and exits
0.
What mpm adds to octave¶
Through mpm, octave 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 octave 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 octave commands, in mpm¶
You already know octave: 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 |
|---|---|---|
|
✅ |
|
|
✅ |
|
|
||
|
✅ |
Lists the whole Octave Packages index, which mpm narrows to the query. Exact and extended search backfilled by |
|
✅ |
|
|
✅ |
|
|
✅ |
|
|
✅ |
|
|
❌ |
Each operation reads the Octave Packages index online, so nothing needs a refresh. |
|
||
|
Configuration¶
Ignore
octaveon thempmCLI by passing the--no-octaveoption.Ignore it for every run in your configuration:
[mpm] octave = false
Raise the timeout of all
octavecalls:[mpm.overrides.octave] timeout = 900
Run
mpm config-template octaveto print all overridable settings for your configuration file:[mpm.overrides.octave] cli_names = [ "octave-cli", "octave", ] cli_search_path = [] dry_run = false plan = false post_args = [] pre_args = [ "--no-init-file", "--quiet", "--no-window-system", ] pre_cmds = [] requirement = ">=7.1.0" stop_on_error = false unmaintained = false version_cli_options = [ "--version", ] version_regexes = [ "GNU Octave.*?version\\s+(?P<version>\\S+)", ] [mpm.overrides.octave.operations.install] extra_args = [] [mpm.overrides.octave.operations.installed] extra_args = [] [mpm.overrides.octave.operations.outdated] extra_args = [] [mpm.overrides.octave.operations.remove] extra_args = [] [mpm.overrides.octave.operations.search] extra_args = [] [mpm.overrides.octave.operations.upgrade_all] extra_args = [] [mpm.overrides.octave.operations.upgrade_one] extra_args = []
The arguments and environment variables listed in the box atop this page are forced on every octave call, so runs stay quiet, non-interactive and reproducible: the defaults you would set in CI anyway.
Recipes¶
A few jobs you would otherwise script around octave, one mpm command each:
Snapshot and clone a machine:
mpm --octave dump octave.toml, thenmpm restore octave.tomlon the next one.Export a compliance SBOM:
mpm --octave 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 is privileged.
See privilege escalation for the full policy.
Cooldown¶
State of GNU Octave pkg’s release-age gating, from the cooldown support table:
Status: ❌ None (each package’s author writes the dates of the index)
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: Octave Packages index
Retraction: Index revert: each package is one YAML file in a GitHub repository, edited by pull request, so a version is withdrawn by removing it from that file (contributing guide)
Publish date: ❌ each version carries a
datethat the package’s author writes into the index entry
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 GNU Octave pkg well and a transcript below looks wrong, or a newer release changed its output format, report it.
$ octave-cli --eval l = pkg ("list"); for K = 1:numel (l) printf ("%s %s\n", l{K}.name, l{K}.version); endfor
doctest 0.8.1
$ octave-cli --eval [s, ok] = urlread ("https://packages.octave.org/packages.json"); if (! ok) s = urlread ("https://gnu-octave.github.io/packages/packages.json"); endif; x = jsondecode (s, "makeValidName", false); l = pkg ("list"); for K = 1:numel (l) n = l{K}.name; if (isfield (x, n)) v = x.(n).versions(1); if (iscell (v)) v = v{1}; endif; try if (compare_versions (v.id, l{K}.version, ">")) printf ("%s %s %s\n", n, l{K}.version, v.id); endif; catch; end_try_catch; endif; endfor
doctest 0.8.1 0.8.2
$ octave-cli --eval [s, ok] = urlread ("https://packages.octave.org/packages.json"); if (! ok) s = urlread ("https://gnu-octave.github.io/packages/packages.json"); endif; x = jsondecode (s, "makeValidName", false); n = fieldnames (x); for K = 1:numel (n) e = x.(n{K}); v = e.versions(1); if (iscell (v)) v = v{1}; endif; printf ("%s %s %s\n", n{K}, v.id, strtrim (regexprep (e.description, "\\s+", " "))); endfor
pkg-example 1.1.0 Example package to demonstrate the creation process of an Octave package. Keep this description brief. Describe the major features in the first two lines (160 characters). Multiple lines are allowed. Each line may have maximal 80 characters. Exceptions are URLs. Paragraphs, blank lines, and line breaks are ignored and replaced by spaces.
pkg-octave-doc 0.8.6 Octave Package Documentation
pkg dev The GNU Octave package management tool `pkg` is already installed with GNU Octave itself. This package is a proof of conecpt and NOT REQUIRED to work with Octave packages.
ponchon-savarit 1.0.0 A toolbox for the Ponchón-Savarit method for GNU Octave.
Version check¶
The version is probed by running:
$ octave-cli --version
GNU Octave (x86_64-pc-linux-gnu) version 11.1.0
Copyright (C) 1993-2026 The Octave Project Developers.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
and extracted with:
r"GNU Octave.*?version\s+(?P<version>\S+)"
Changelog¶
8.3.0.dev0(unreleased)Add GNU Octave’s
pkgpackage manager, withinstalled,outdated,search,install,upgradeandremovesupport.