Use it when installation fails with unmet dependencies or conflicts, or before removing a package.
Package Dependencies
Package dependencies are the other packages (or capabilities such as a library) a package needs. The package manager installs them automatically and refuses changes that would break them.
1. Read the exact unmet dependency in the error.
2. Who provides it? apt-cache policy <dep> / dnf repoquery --whatprovides <dep>.
3. Missing repo or version mismatch → fix repositories.
4. Before removing: reverse dependencies.
5. Simulate first (apt -s, dnf --assumeno).
package requested → dependencies resolved from enabled repositories → conflicts checked → transaction installs all
For Package Management → Package Dependencies, continue with the first unproven Topic check: Pin requested package/version and capture the exact dependency/conflict solver explanation. If that boundary is healthy, advance to the adjacent check: Trace unavailable or conflicting requirements to repository, architecture, version/pin/stream or installed-state boundaries. 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
requested package/version → dependency/provides/conflicts metadata → available candidates across enabled repos → solver graph → consistent transaction set → installed package graph → runtime linker/service/application dependencies → workload verification
Healthy evidence: the solver graph is explainable, all selected requirements come from intended repositories/versions, the transaction is consistent and runtime/application acceptance also succeeds.
Step 2 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Pin requested package/version and capture the exact dependency/conflict solver explanation.
- Trace unavailable or conflicting requirements to repository, architecture, version/pin/stream or installed-state boundaries.
- Avoid force/ignore-dependency actions until the unsatisfied relationship is confirmed and risk understood.
- After resolving package dependencies, verify runtime linking/service dependencies and original workload acceptance separately.
Verification chain. requested package/version → dependency/provides/conflicts metadata → available candidates across enabled repos → solver graph → consistent transaction set → installed package graph → runtime linker/service/application dependencies → workload verification
Step 3 Commands Verify boundary
apt-cache depends nginx
apt-cache rdepends libssl3
dnf repoquery --requires nginx
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: operators force installation past dependency errors or equate a solvable package graph with runtime compatibility without testing the actual workload.
Step 5 Common mistakes Narrow the fault
- Removing a package and its reverse dependencies unknowingly.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Do not force installs (--nodeps, --force) — they leave a broken system. Unmet dependencies usually mean a missing or mismatched repository. Check reverse dependencies before removing: apt rdepends --installed / dnf repoquery --whatrequires.
apt policy <pkg> / dnf info <pkg>— installed and candidate versionsdpkg -l <pkg> / rpm -q <pkg>— installed packageapt-cache depends <pkg> / dnf repoquery --requires <pkg>— dependenciesdpkg -S <file> / rpm -qf <file>— package owning a file
ReferenceWhat it is1 section · depth on demand
Core model
Start from the exact requested package and candidate version, then inspect the solver graph: required capabilities/packages, version constraints, conflicts/obsoletes/replaces/provides and architecture/repository availability. Distinguish dependency metadata from runtime shared-library loading and application protocol compatibility. Solver failure is evidence of an unsatisfied model; solver success only shows a package-level solution was found.
ReferenceImportant terms & boundaries6 sections · depth on demand
What this shows and what it does not
Package dependency resolution shows metadata-level satisfiability for the chosen package set, but it does not show runtime ABI, service ordering, configuration or business-function compatibility.
In depth
Package dependencies: how they're resolved and what goes wrong
Packages declare what they need, and the package manager installs those dependencies automatically. It also tracks which packages were installed only as dependencies. The apt(8) manual page explains that autoremove removes automatically installed packages that are no longer needed. Packages you installed explicitly are never proposed. The DNF command reference describes the same behaviour for dnf autoremove, and notes that dnf remove also removes unneeded dependencies by default.
Dependency types
| Debian field | RPM tag | Meaning |
|---|---|---|
| Depends | Requires | Must be installed |
| Recommends | Recommends (weak) | Installed by default, but can be skipped |
| Suggests | Suggests (weak) | Not installed automatically |
| Conflicts / Breaks | Conflicts | Can't be installed together |
| Provides | Provides | Satisfies a virtual name, e.g. mail-transport-agent |
| Replaces | Obsoletes | Takes over files or replaces a package |
Inspecting dependencies
| Question | Debian / Ubuntu | RHEL family |
|---|---|---|
| What does a package need? | apt-cache depends pkg | dnf repoquery --requires pkg |
| What needs this package? | apt-cache rdepends --installed pkg | dnf repoquery --whatrequires pkg --installed |
| Why is it installed? | aptitude why pkg, apt-mark showauto | dnf repoquery --installed --userinstalled |
| Without recommended packages | apt install --no-install-recommends pkg | dnf install --setopt=install_weak_deps=False pkg |
Common problems
| Problem | Cause and fix |
|---|---|
| "Unmet dependencies" | Mixed releases or third-party repositories; check apt policy, remove the conflicting source |
autoremove wants to remove something important | It was installed as a dependency only; mark it manual (apt-mark manual, dnf mark install) |
| Removing one package removes many others | They depend on it; read the list before confirming |
| A held or pinned package blocks upgrades | apt-mark showhold; versionlock in DNF |
host$ apt-cache depends nginx | head -5
nginx
Depends: nginx-common
Depends: libc6
Depends: libpcre2-8-0
host$ apt-cache rdepends --installed libssl3 | head -4
host$ sudo apt autoremove --dry-run | grep ^Remv
Remv linux-image-6.8.0-45-generic [6.8.0-45.45]
Remv python3-yaml [6.0.1-2build2]
host$ sudo apt-mark manual python3-yaml
host$ sudo apt install --no-install-recommends postfix
host$ dnf repoquery --whatrequires openssl-libs --installed | wc -l
Reading the dry run
autoremove would remove python3-yaml, because nothing installed through the package manager needs it any more. A local script might still use it. apt-mark manual keeps it. Always do a dry run of autoremove on servers before letting it remove anything.
Documented example, not captured output.
Known-good, transitional and broken reference
Package Dependencies — comparative operational reference for Package Management → Package Dependencies. What it does not show: systemd active/running or host-global state alone does not show the workload context is healthy Next check: move one step toward the original workload using Verify installed package/file version, running process/library/config state and service behavior, then repeat the original workload after any required controlled restart/reload. Platform/scope: Package manager and package naming differ across Debian/Ubuntu, RHEL-family and other distributions.
How it works at runtime
Package Dependencies is part of Package Management → Package Dependencies. Package 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.
Topic-specific state model. Package 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.
Interpretation rule. - Dependency solver success ≠ application compatibility.
- Installed dependency package ≠ required runtime symbol/service available in the needed context.
- Provides/capability match ≠ identical implementation behavior.
- Forced dependency bypass ≠ repaired dependency graph.
Quick reference
Package dependencies are resolved by the package manager from metadata (Requires/Provides for RPM, Depends/Recommends/Suggests for deb).
dnf repoquery --requires nginx; dnf repoquery --whatrequires openssl-libs
rpm -q --requires openssh-server
apt-cache depends nginx; apt-cache rdepends --installed libssl3
apt install -f # fix broken deps
dnf distro-sync # align with repo versions
Conflicts usually come from mixing repositories (third-party repos replacing base packages, different distro versions). Keep third-party repos minimal and pinned, and check what a removal will take with it before confirming (dnf remove lists dependent packages).
Limits and how it fails
Primary failure point. Package dependency resolution shows metadata-level satisfiability for the chosen package set, but it does not show runtime ABI, service ordering, configuration or business-function compatibility.
Preserve at least three independent checks: prerequisite/interface or identity/transport state; the responsible control/service/policy state; then effective data-plane, backend or workload state. A healthy upstream step does not show the downstream consumer or return path.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. Package Dependencies owns package-metadata dependency/conflict/solver semantics across package families. Dynamic linking, systemd dependencies and application dependency behavior remain separate branches.
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 → Package Dependencies. 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 Dependencies operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for Package Dependencies.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | Package 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. | 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 | requested package/version → dependency/provides/conflicts metadata → available candidates across enabled repos → solver graph → consistent transaction set → installed package graph → runtime linker/service/application dependencies → workload verification | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | Package dependency resolution proves metadata-level satisfiability for the chosen package set; it does not prove runtime ABI, service ordering, configuration or business-function compatibility. | 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: requested package/version → dependency/provides/conflicts metadata → available candidates across enabled repos → solver graph → consistent transaction set → installed package graph → runtime linker/service/application dependencies → 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 dependency resolution proves metadata-level satisfiability for the chosen package set; it does not prove runtime ABI, service ordering, configuration or business-function compatibility. | 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 Dependencies · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | Package Dependencies |
|---|---|
| Topic path | Package Management → Package Dependencies |
| Runtime state | Package 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. |
| Fast checks | - Pin requested package/version and capture the exact dependency/conflict solver explanation. - Trace unavailable or conflicting requirements to repository, architecture, version/pin/stream or installed-state boundaries. - Avoid force/ignore-dependency actions until the unsatisfied relationship is proven and risk understood. - After resolving package dependencies, verify runtime linking/service dependencies and original workload acceptance separately. |
| Verification chain | requested package/version → dependency/provides/conflicts metadata → available candidates across enabled repos → solver graph → consistent transaction set → installed package graph → runtime linker/service/application dependencies → workload verification Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary. |
| Failure boundary | Package dependency resolution proves metadata-level satisfiability for the chosen package set; it does not prove runtime ABI, service ordering, configuration or business-function compatibility. Boundary chain: repository/metadata → dependency resolution → artifact/signature → package database/file install → scriptlets → service/process reload → effective binary/config → workload. Preserve at least three independent checks: prerequisite/interface or identity/transport state; the owning control/service/policy state; then effective data-plane, backend or workload state. A healthy upstream boundary does not prove the downstream consumer or return path. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |