mpm cleanup - Cleanup local data.
Cleanup local data and temporary artifacts.
The work decomposes into cumulative categories, each with a
two-sided flag pair: `--orphans/--skip-orphans` (system-wide orphan sweep),
`--cache/--skip-cache` (caches, downloads and left-overs) and
`--repair/--skip-repair` (local state verification). Positive flags narrow
the run to exactly the listed categories; skip flags subtract from the
default selection.
A plain `cleanup` runs the cache and repair categories and never
removes a package: the orphan sweep is the one destructive category, so it
only runs on an explicit `--orphans`, uniformly across managers, just as
`remove` keeps its dependency cascade behind the same flag. A manager with
no native sweep verb but a native orphan listing gets the sweep synthesized:
list the orphans, remove them one by one, and repeat until none are left.
Managers supporting none of the selected categories are skipped.
- --orphans /
--skip-orphans
- Remove orphaned packages (those nothing depends on anymore) using each
manager's system-wide sweep, native or synthesized from its orphan
listing. The only category removing packages, so it never runs unless
requested.
- --cache /
--skip-cache
- Prune caches, downloads and other left-over artifacts. The broadest
category: for most managers the whole cleanup amounts to it.
- --repair /
--skip-repair
- Verify and repair the manager's local installation state (like `flatpak
repair`).
- --help /
-h
- Show this message and exit.
- CLEANUP_ORPHANS
- Remove orphaned packages (those nothing depends on anymore) using each
manager's system-wide sweep, native or synthesized from its orphan
listing. The only category removing packages, so it never runs unless
requested.
- CLEANUP_CACHE
- Prune caches, downloads and other left-over artifacts. The broadest
category: for most managers the whole cleanup amounts to it.
- CLEANUP_REPAIR
- Verify and repair the manager's local installation state (like `flatpak
repair`).
- CLEANUP_HELP
- Show this message and exit.
- 0
- Success.
- 1
- A runtime error, or an aborted prompt (Ctrl-C, a declined
confirmation).
- 2
- A usage error: unknown option, invalid value, missing operand, or an
unparsable configuration file.