Use it as the entry point for installing software, applying updates, or fixing package errors.
Package Management
Package management installs, updates and removes software from trusted repositories, resolving dependencies: APT/dpkg on Debian and Ubuntu, DNF/RPM on RHEL, Rocky, AlmaLinux and Fedora.
1. Which family? cat /etc/os-release.
2. Metadata refresh without errors?
3. Simulate: apt -s upgrade / dnf upgrade --assumeno.
4. Apply and review the transaction.
5. Services restarted where needed (needrestart / dnf needs-restarting -r).
repositories → signed metadata → dependency resolution → download → install → history recorded
For Package Management, continue with the first unproven Topic check: Identify distribution/release, architecture, package manager and exact package/version request. If that boundary is healthy, advance to the adjacent check: Capture enabled repositories, metadata age/trust state and the proposed transaction before changing anything. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
distribution/release + architecture → repository configuration/trust → metadata refresh → dependency solver/transaction plan → package download + integrity/signature checks → local package database transaction → files/scripts/configuration → runtime/service effects → workload verification
Healthy evidence: repository metadata is trusted/current, the solver selects the intended versions, the transaction commits cleanly, local package state matches intent and the affected workload passes its acceptance check.
Step 2 Operational verification Verify boundary
Package metadata, repositories, updates, dependency state and package troubleshooting.
Fast verification
- Confirm repository configuration and metadata freshness before blaming package dependencies.
- Compare installed/candidate versions (apt policy/dnf info) and inspect held or pinned packages.
- Resolve the first dependency/repository error; repeated retries rarely change the dependency graph.
Step 3 Verification and output interpretation Verify boundary
Verification path. Show repository reachability and metadata freshness, candidate/version selection, transaction result and package database state. Then verify file ownership/checksums where needed and the running consumer version separately. For dependency conflicts, capture the exact solver explanation and enabled repositories rather than deleting packages ad hoc. After library updates, identify long-running processes that still map the previous inode/version before declaring the update operationally complete.
Existing fast checks for this Topic. - Identify distribution/release, architecture, package manager and exact package/version request.
- Capture enabled repositories, metadata age/trust state and the proposed transaction before changing anything.
- Verify local package database state and deployed version/files after the transaction.
- Repeat the original workload/health test and review service/reboot/configuration side effects.
Verification chain. distribution/release + architecture → repository configuration/trust → metadata refresh → dependency solver/transaction plan → package download + integrity/signature checks → local package database transaction → files/scripts/configuration → runtime/service effects → workload verification
Step 4 Commands Verify boundary
apt update && apt list --upgradable
dnf check-update
rpm -qa | sort | head
dpkg -l | grep openssl
Step 5 Failure modes and next checks Narrow the fault
Suspicious evidence: operators treat a successful package command as complete evidence while stale metadata, wrong repository origin, pending reboot/service restart or broken workload state remains.
It does not show behavior outside the captured repository, solver, transaction, local package database, runtime-side-effect or workload scope. Package-management evidence shows only the repository/solver/transaction/package-state boundaries that were observed; it does not by itself show the resulting service, application or security outcome.
Next check: Continue from the first step that has not been verified: confirm distribution/release and repository trust, inspect candidate/origin and solver policy, correlate the package-manager transaction with dpkg/RPM local state, then test affected services and the original workload before making additional package changes.
Step 6 Quality lift: branching diagnosis Narrow the fault
Concrete boundaries: repository/metadata → dependency resolution → artifact/signature → package database/file install → scriptlets → service/process reload → effective binary/config → workload.
Step 7 Common mistakes Narrow the fault
- Mixing package managers or repositories from different releases.
- Upgrading production without testing.
Evidence · 2 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Healthy evidence: repository metadata is trusted/current, the solver selects the intended versions, the transaction commits cleanly, local package state matches intent and the affected workload passes its acceptance check. Suspicious evidence: operators treat a successful package command as complete proof while stale metadata, wrong repository origin, pending reboot/service restart or broken workload state remains.
command output · Documented examplePackages & Repositories local healthy-state checkpointThe expected object, scope, state and counters match a controlled test.
Subtopics
Go one level deeper into this subject.
Debian and Ubuntu package management layers APT dependency/repository policy over dpkg local package state, with Debian package metadata, maintainer scripts, debconf/config-file semantics and distribution release pockets influencing the effective transaction.
Subtopic RHEL / Rocky / AlmaLinuxRHEL-family package management uses RPM as the local package format/database with DNF as the modern repository-aware solver and transaction manager; YUM may be legacy or a compatibility frontend depending on release.
Subtopic Package DependenciesPackage dependencies express package-level requirements, capabilities, conflicts, alternatives and ordering constraints that a package manager solver uses to construct a consistent transaction; they are metadata relationships, not a guarantee that the resulting application stack is semantically compatible.
Refresh metadata first, keep repositories signed and supported, never force installs, and review what an upgrade will change. Keep the history (/var/log/apt/history.log, dnf history) for rollback and audits.
apt update / dnf makecache— refresh metadataapt list --upgradable / dnf check-update— pending updatesapt policy <pkg> / dnf info <pkg>— versions and source repositorydnf history / less /var/log/apt/history.log— past transactions
ReferenceWhat it is3 sections · depth on demand
Operational scope
Package metadata, repositories, updates, dependency state and package troubleshooting.
Close with Verify installed package/file version, running process/library/config state and service behavior, then repeat the original workload after any required controlled restart/reload. and state what the evidence does not show.
What it is
Package metadata, repositories, updates, dependency state and package troubleshooting.
Core model
Start by pinning distribution/release, architecture, enabled repositories and the exact requested package/action. Separate repository metadata refresh from dependency solving, download from signature/trust verification, transaction planning from local database commit, package installation from service activation, and package state from the original application outcome. Preserve the transaction log and package versions before remediation so rollback or comparison remains possible.
ReferenceWhy it matters3 sections · depth on demand
When to use it
Use Packages & Repositories when the problem concerns Linux runtime, services, networking, identity, packages, storage or shell automation.
Why it matters operationally
The useful outcome is not simply knowing a definition; it is being able to decide whether Packages & Repositories is healthy, misconfigured, missing, or only a symptom of a failure somewhere else.
Quality lift: concrete internals
Package Management quality lift — inspect the concrete Linux package transaction and effective runtime mechanics rather than treating existing coverage as completion. Package management resolves repositories/metadata, dependency/version constraints, downloads/verifies artifacts, executes package scripts and updates files/database. Transaction success does not show the service reloaded, the expected binary is first in PATH, or running processes use the new library/config. Repository metadata and installed-state databases are different evidence layers.
ReferenceHow it works1 section · depth on demand
How it works
Package metadata, repositories, updates, dependency state and package troubleshooting.
ReferenceImportant terms & boundaries4 sections · depth on demand
What this shows and what it does not
Package-management evidence shows only the repository/solver/transaction/package-state boundaries that were observed; it does not by itself show the resulting service, application or security outcome.
In depth
Package management across the two big families
Nearly every Linux distribution belongs to one of two packaging families. The command names differ, but the tasks are the same.
- Debian family: Debian and Ubuntu use
.debpackages,dpkgfor the low level, and APT on top. The apt(8) manual page describesaptas a tool for interactive use. Its behaviour may change between versions, so scripts should useapt-getandapt-cache. - RHEL family: RHEL, Rocky, AlmaLinux and Fedora use
.rpmpackages,rpmfor the low level, and DNF on top.
The same tasks in both families
| Task | Debian / Ubuntu | RHEL / Rocky / Alma / Fedora |
|---|---|---|
| Refresh repository metadata | apt update | dnf makecache (or automatic) |
| List available updates | apt list --upgradable | dnf check-update |
| Install updates | apt upgrade / apt full-upgrade | dnf upgrade |
| Install a package | apt install nginx | dnf install nginx |
| Remove a package | apt remove / apt purge | dnf remove |
| Remove unneeded dependencies | apt autoremove | dnf autoremove |
| Search | apt search <regex> | dnf search <word> |
| Package details | apt show <pkg> | dnf info <pkg> |
| Which package owns a file | dpkg -S /path | rpm -qf /path |
| Files in a package | dpkg -L <pkg> | rpm -ql <pkg> |
| Which package provides a file (even if not installed) | apt-file search /path | dnf provides /path |
| Transaction history | /var/log/apt/history.log | dnf history |
Patching routine for servers
| Step | Purpose |
|---|---|
| 1. Review the pending updates | Know what will change (kernel, libc, database) |
| 2. Snapshot or back up | A rollback path |
| 3. Apply the updates | Package manager |
| 4. Restart affected services, or reboot for kernel and libc updates | Old code keeps running until then |
| 5. Verify services and logs | Confirm the result |
host$ sudo apt update && apt list --upgradable 2>/dev/null | head -4
host$ sudo apt full-upgrade
host$ [ -f /var/run/reboot-required ] && cat /var/run/reboot-required.pkgs
host$ sudo needrestart -r l
host$ sudo dnf check-update; echo "exit=$?"
exit=100
host$ sudo dnf upgrade --refresh
host$ sudo dnf needs-restarting -r
Finding what still runs old code
After updates, services keep running the old versions until they're restarted. needrestart (Debian and Ubuntu) and dnf needs-restarting (RHEL family) list them, and report whether a full reboot is needed, for example after a kernel update.
Documented example, not captured output.
How it works at runtime
Package Management is part of Package Management. Linux package management coordinates trusted software metadata, dependency resolution, package acquisition, local package database changes, file deployment, maintainer or transaction scripts and post-install runtime effects; manager success must be separated from repository trust, package state and workload acceptance.
Runtime state ownership and mechanics. Package management resolves requested names through configured repositories and metadata into signed package artifacts, dependency transactions, filesystem changes and maintainer/scriptlet actions. The package database records installed ownership/version state, but running processes can continue using old mapped binaries or libraries after an upgrade. Repository priority, module/stream policy, pinning and architecture affect what candidate version is selected.
Topic-specific state model. Linux package management coordinates trusted software metadata, dependency resolution, package acquisition, local package database changes, file deployment, maintainer or transaction scripts and post-install runtime effects; manager success must be separated from repository trust, package state and workload acceptance.
Technical metadata. Host, distribution/release/codename, architecture, package manager/backend versions, package name + version/NEVRA, installed state, candidate/origin, enabled repositories, repository URL/ID, metadata timestamp, signing/GPG trust, pin/priority/hold/exclude/versionlock/module state, dependency/conflict graph, transaction plan/ID/history, download/integrity result, dpkg/RPM database state, maintainer script/scriptlet result, conffile/config effects, service/restart/reboot impact, original workload result.
Interpretation rule. - Repository reachable ≠ repository metadata trusted or current.
- Dependency solution accepted ≠ packages installed successfully.
- Package installed/configured ≠ service started, enabled or healthy.
- Package-manager exit success ≠ original workload or security posture verified.
Limits and how it fails
Primary failure point. Package-management evidence shows only the repository/solver/transaction/package-state boundaries that were observed; it does not by itself show the resulting service, application or security outcome.
Boundary chain: repository/metadata → dependency resolution → artifact/signature → package database/file install → scriptlets → service/process reload → effective binary/config → workload.
Model. “Installed” does not mean running, and “latest” is relative to enabled repositories, priorities and architecture. A successful package transaction does not show daemon configuration is valid or service restart succeeded. Package ownership does not include every generated or administrator-managed file. Repository TLS/signature success shows artifact/source integrity properties, not application fitness. Keep package state, filesystem state and runtime state distinct.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Configuration intent and lifecycle. Treat repository definitions, signing keys, proxy configuration, pin/priorities and package holds/excludes as policy. Refresh metadata deliberately and review the transaction before applying broad upgrades. Distinguish package installation from service enablement/restart and from kernel activation. Avoid mixing unmanaged source installs with package-owned paths unless ownership is explicit, because later upgrades/uninstalls can overwrite or orphan files.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Package Management. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.debian.org/doc/manuals/debian-reference/ch02.en.html · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Package Management operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for Package Management.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | Linux package management coordinates trusted software metadata, dependency resolution, package acquisition, local package database changes, file deployment, maintainer or transaction scripts and post-install runtime effects; manager success must be separated from repository trust, package state and workload acceptance. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin host + distribution/release + architecture → identify exact package/version request → enumerate effective repositories/trust → refresh/inspect metadata → compare installed versus candidate/origin → review dependency/conflict transaction → capture package-manager transaction → verify local package database/files/scripts → inspect service/reboot/config effects → repeat original workload test. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | distribution/release + architecture → repository configuration/trust → metadata refresh → dependency solver/transaction plan → package download + integrity/signature checks → local package database transaction → files/scripts/configuration → runtime/service effects → workload verification | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | Package-management evidence proves only the repository/solver/transaction/package-state boundaries that were observed; it does not by itself prove the resulting service, application or security outcome. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux package-management evidence can establish this proof path: distribution/release + architecture → repository configuration/trust → metadata refresh → dependency solver/transaction plan → package download + integrity/signature checks → local package database transaction → files/scripts/configuration → runtime/service effects → workload verification | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove behavior outside the captured repository, solver, transaction, local package database, runtime-side-effect or workload scope. Package-management evidence proves only the repository/solver/transaction/package-state boundaries that were observed; it does not by itself prove the resulting service, application or security outcome. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven boundary: confirm distribution/release and repository trust, inspect candidate/origin and solver policy, correlate the package-manager transaction with dpkg/RPM local state, then test affected services and the original workload before making additional package changes. | Continue to the next unresolved boundary while preserving the original test condition. |
Package Management · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | Package Management |
|---|---|
| Topic path | Package Management |
| Runtime state | Linux package management coordinates trusted software metadata, dependency resolution, package acquisition, local package database changes, file deployment, maintainer or transaction scripts and post-install runtime effects; manager success must be separated from repository trust, package state and workload acceptance. |
| Fast checks | - Identify distribution/release, architecture, package manager and exact package/version request. - Capture enabled repositories, metadata age/trust state and the proposed transaction before changing anything. - Verify local package database state and deployed version/files after the transaction. - Repeat the original workload/health test and review service/reboot/configuration side effects. |
| Verification chain | distribution/release + architecture → repository configuration/trust → metadata refresh → dependency solver/transaction plan → package download + integrity/signature checks → local package database transaction → files/scripts/configuration → runtime/service effects → workload verification Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. |
| Failure boundary | Package-management evidence proves only the repository/solver/transaction/package-state boundaries that were observed; it does not by itself prove the resulting service, application or security outcome. Boundary chain: repository/metadata → dependency resolution → artifact/signature → package database/file install → scriptlets → service/process reload → effective binary/config → workload. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |