Gentoo emerge¶
- ID
emerge- Links
- Upstream stars
⭐ 671
- Last commit
2026-09-26
- Version requirement
>= 3
- Platforms
🅱️ BSD · 🐧 Linux · ⨂ Unix
- Operations
installed·outdated·orphans·search·install·upgrade·upgrade_all·remove·sync·cleanup- purl types
pkg:ebuild/·pkg:emerge/- CLI name
emerge- Every call
emerge --quiet --color n --nospinner <command>- Issues and PRs
- Source
Portage’s emerge, Gentoo’s source-based package manager.
Command equivalences with other managers are listed in Pacman/Rosetta.
The outdated listing and the whole-system upgrade operate against the
@world set.
What mpm adds to emerge¶
mpm reaches across every manager at once, not emerge alone: mpm installed and mpm outdated cover emerge 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 emerge commands, in mpm¶
You already know emerge: 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 |
`emerge –search %^(htop |
tmux)$` |
Install a package |
|
|
Upgrade one package |
|
|
Upgrade everything |
|
|
Remove a package |
|
|
List orphaned dependencies |
|
|
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 |
|---|---|---|
|
✅ |
Reads through the companion |
|
✅ |
|
|
✅ |
|
|
✅ |
|
|
✅ |
|
|
✅ |
|
|
✅ |
|
|
✅ |
|
|
✅ |
|
|
✅ |
Trims distfiles through the companion |
|
Configuration¶
Ignore
emergeon thempmCLI by passing the--no-emergeoption.Ignore it for every run in your configuration:
[mpm] emerge = false
Raise the timeout of all
emergecalls:[mpm.overrides.emerge] timeout = 900
Run
mpm config-template emergeto print all overridable settings for your configuration file:[mpm.overrides.emerge] cli_names = [ "emerge", ] cli_search_path = [] dry_run = false ignore_auto_updates = true plan = false post_args = [] pre_args = [ "--quiet", "--color", "n", "--nospinner", ] pre_cmds = [] requirement = ">=3.0.0" stop_on_error = false unmaintained = false version_cli_options = [ "--version", ] version_regexes = [ "Portage\\s+(?P<version>\\S+)", ]
The arguments and environment variables listed in the box atop this page are forced on every emerge 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 emerge, one mpm command each:
Snapshot and clone a machine:
mpm --emerge dump emerge.toml, thenmpm restore emerge.tomlon the next one.Export a compliance SBOM:
mpm --emerge sbom(CycloneDX by default,--spdxfor SPDX).
Privilege escalation¶
System-wide manager: mpm wraps its privileged operations in sudo out of the box. Instead of letting the tool prompt mid-run, mpm primes the credential cache up-front, with a single branded password prompt at most. Turn escalation off for rootless setups with --no-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 Gentoo emerge’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: Source-based recipe trees
Retraction: Index revert of the recipe tree
Publish date: ❌ a recipe carries no 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 manager source. If you know Gentoo emerge well and a transcript below looks wrong, or a newer release changed its output format, report it.
$ qlist --installed --verbose --nocolor
app-admin/sudo-1.9.17_p2
app-alternatives/awk-4
app-arch/unzip-6.0_p29-r2
app-misc/pax-utils-1.3.10
app-misc/tmux-3.5a
app-shells/bash-5.3_p15
dev-perl/Locale-gettext-1.70.0_p20181130
dev-perl/SGMLSpm-1.1-r2
$ emerge --color n --nospinner --update --deep --pretend --columns @world
[ebuild U ] sys-process/htop [3.5.3] [3.5.1]
[binary gU ] app-editors/nano [9.2-1] [9.1]
$ emerge --quiet --color n --nospinner --depclean --pretend
app-misc/tmux: 3.5a none none
dev-libs/libevent: 2.1.13 none none
All selected packages: =app-misc/tmux-3.5a =dev-libs/libevent-2.1.13
Packages installed: 327
Packages in world: 8
Packages in system: 50
Required packages: 325
Number to remove: 2
Version check¶
The version is probed by running:
$ emerge --version
Portage 3.0.81.3 (python 3.14.7-final-0, default/linux/arm64/23.0, gcc-15, glibc-2.43-r2, 6.18.48-gentoo-dist-bin aarch64)
and extracted with:
r"Portage\s+(?P<version>\S+)"
Upstream project¶
Metrics |
|
|---|---|
Activity |
|
Popularity |
|
Metadata |
|
Changelog¶
8.0.0(2026-09-20)Fix
outdatedandsearch, which reported nothing on Gentoo: the global--quietthey sent strips the fields their parsers read.Correct the commands shown on each manager’s page, which named fewer options than
mpmactually runs.
7.4.0(2026-07-25)Plain
cleanupno longer removes orphaned packages: their native sweeps moved behindcleanup --orphans. This also stopsemerge’s cleanup from triggering its pre-depclean world upgrade unless--orphansis given.The
cleanupsteps split intocleanup_orphan(the safety upgrade plus--depclean) andcleanup_cache(eclean distfiles), givingemergenativecleanup --orphanssupport.
6.4.0(2026-04-27)Add
removeoperation. Closes #1775.
6.2.0(2026-03-25)Add
--quiet,--color nand--nospinnertopre_args. Refactor inline flags.
5.5.0(2022-07-08)Locate and validate
qlistandecleanCLI availability.
5.0.0(2022-04-25)Add
emergesupport.