Find Out Why Ubuntu Keeps a Package Back
Before you begin
- Applies to:Ubuntu hosts that report a package was kept back during an APT upgrade.
- Where to start:Open a terminal on the affected Ubuntu host and start with its current package indexes.
- What you need:Record the exact binary package name from APT. The example uses curl. Note when the indexes were last refreshed and follow the approved update schedule if they need refreshing.
Guide tools
Troubleshooting Steps
Capture the exact message and installed version
Start hereRecord which command showed the message and whether it mentioned phasing, a kept-back package, or dependency errors. The installed version is distinct from the version APT would select.
dpkg-query -W -f='${Status} ${Version}\n' curlCheck for an explicit hold
Look for the affected package in the list. A hold may be deliberate during a coordinated rollout. If the name appears, ask the package owner before removing it. An empty list means no holds are shown.
apt-mark showholdInspect the candidate and package priorities
Read Installed, Candidate, the repository origins, and priority for each available version. If the expected newer version is missing, check index freshness and approved sources. If it is present but not selected, check the hostโs pinning and phasing before editing repository settings.
What you should see ยท APT lists the installed version, the candidate version, and its repository.
If you see something else ยท If the candidate is unchanged, check the repository and package policy before updating. If the newer candidate appears but remains kept back, continue to the simulation step and inspect proposed installs and removals.
apt-cache policy curlPreview regular and targeted upgrade behavior
Run both commands in simulation. The first shows the normal apt-get upgrade plan, which does not remove installed packages or install new packages. The second previews installing a candidate for an already installed package and can show different dependency actions. Compare the target and any extra install or removal lines. The simulation uses the current indexes. If the account cannot read APT configuration, arrange an approved privileged simulation.
apt-get --simulate upgradeapt-get --simulate install --only-upgrade curlDecide whether to wait or correct policy
For confirmed phasing, wait for rollout eligibility and recheck on the next maintenance cycle. If a pin or hold is intentional, keep it and document the owner. For necessary dependency changes, review the proposed packages and a recovery plan before approving a targeted upgrade.
Verify package state and application behavior
After an approved upgrade, rerun the installed and candidate checks and verify the service or application that uses the package. If intentionally deferred, document the reason, installed version, target version, and a recheck date.
Decide What to Do Next
| Finding | Next action |
|---|---|
| Package appears in showhold | Confirm the reason and owner. |
| Update is deferred due to phasing | Wait for normal rollout unless your approved policy explicitly differs. |
| Simulation proposes removing packages | Pause and inspect those dependencies before approving changes. |
References
Your feedback keeps these production procedures accurate and battle-tested.