PEAR¶
- ID
pear- Links
- Upstream stars
⭐ 115
- Last commit
2026-01-25
- Version requirement
>= 1.10
- Platforms
🅱️ BSD · 🐧 Linux · 🍎 macOS · ⨂ Unix · 🪟 Windows
- Operations
installed·outdated·install·upgrade·upgrade_all·remove·sync·cleanup- purl types
pkg:pear/- CLI name
pear- Issues and PRs
- Source
The PHP Extension and Application Repository.
PEAR ships with PHP itself and installs libraries into the interpreter’s
php_dir, against its own registry at pear.php.net.
Important
Whether an install needs root is a property of the PHP install, not of
PEAR: a distribution’s php_dir is /usr/share/php and refuses an
ordinary user with Cannot install, php_dir for channel "pear.php.net" is not writable by the current user. Escalate the mutating operations
with mpm --sudo, or a [mpm.overrides.pear] sudo = true entry. The
privilege-free alternative is relocating the PEAR prefix to a directory
you own.
Caution
Every network operation costs one REST round-trip per package, and
pear.php.net answers slowly: outdated measured 63 seconds warm and 105
seconds cold against a host carrying only six packages, so it approaches
mpm’s 120-second read-only cap on an inventory barely larger. Raise
mpm --timeout on a host with more. installed is unaffected, reading the
local registry with no network at all.
What mpm adds to pear¶
mpm reaches across every manager at once, not pear alone: mpm installed and mpm outdated cover pear 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 pear commands, in mpm¶
You already know pear: 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 |
|
|
Install a package |
|
|
Upgrade one package |
|
|
Upgrade everything |
|
|
Remove a package |
|
|
Clear caches |
|
|
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 |
|---|---|---|
|
✅ |
Each package is reported under its bare name, so the same name on two channels would collapse onto one entry. |
|
✅ |
|
|
||
|
❌ |
Search needs one REST call per package against |
|
✅ |
|
|
✅ |
|
|
✅ |
|
|
✅ |
|
|
✅ |
|
|
✅ |
|
|
Configuration¶
Ignore
pearon thempmCLI by passing the--no-pearoption.Ignore it for every run in your configuration:
[mpm] pear = false
Raise the timeout of all
pearcalls:[mpm.overrides.pear] timeout = 900
Run
mpm config-template pearto print all overridable settings for your configuration file:[mpm.overrides.pear] cli_names = [ "pear", ] cli_search_path = [] dry_run = false ignore_auto_updates = true plan = false post_args = [] pre_args = [] pre_cmds = [] requirement = ">=1.10.0" stop_on_error = false unmaintained = false version_cli_options = [ "version", ] version_regexes = [ "PEAR Version:\\s+(?P<version>\\S+)", ]
Recipes¶
A few jobs you would otherwise script around pear, one mpm command each:
Snapshot and clone a machine:
mpm --pear dump pear.toml, thenmpm restore pear.tomlon the next one.Export a compliance SBOM:
mpm --pear 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.
Its privileged operations are cleanup, install, remove, sync, upgrade, upgrade_all.
See privilege escalation for the full policy.
Cooldown¶
State of PEAR’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: PEAR (
pkg:pear)Publish date: ✅ per-release
<da>in the REST release document (example), which nopearcommand surfaces
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 manager source. If you know PEAR well and a transcript below looks wrong, or a newer release changed its output format, report it.
$ pear list --allchannels
INSTALLED PACKAGES, CHANNEL __URI:
==================================
(no packages installed)
INSTALLED PACKAGES, CHANNEL DOC.PHP.NET:
========================================
(no packages installed)
INSTALLED PACKAGES, CHANNEL PEAR.PHP.NET:
=========================================
PACKAGE VERSION STATE
Archive_Tar 1.5.0 stable
Console_Getopt 1.4.3 stable
PEAR 1.10.16 stable
PEAR_Manpages 1.10.0 stable
Structures_Graph 1.2.0 stable
XML_Util 1.4.5 stable
INSTALLED PACKAGES, CHANNEL PECL.PHP.NET:
=========================================
(no packages installed)
$ pear list-upgrades
PEAR.PHP.NET AVAILABLE UPGRADES (STABLE):
=========================================
CHANNEL PACKAGE LOCAL REMOTE SIZE
pear.php.net Archive_Tar 1.5.0 (stable) 1.6.0 (stable) 22kB
pear.php.net PEAR 1.10.16 (stable) 1.10.18 (stable) 288kB
Version check¶
The version is probed by running:
$ pear version
PEAR Version: 1.10.16
PHP Version: 8.4.24
Zend Engine Version: 4.4.24
Running on: Linux debian 6.12.94+deb13-arm64 #1 SMP Debian 6.12.94-1 (2026-06-20) aarch64
and extracted with:
r"PEAR Version:\s+(?P<version>\S+)"
Upstream project¶
Metrics |
|
|---|---|
Activity |
|
Popularity |
|
Metadata |
|
Changelog¶
8.0.0(2026-09-20)Add the PEAR package manager with inventory, outdated, install, remove, upgrade, channel sync and cache cleanup.