update package ubuntu17 min read

How to Update Package Ubuntu: The Complete Guide 2026

Learn to update package ubuntu using apt, snap, and Flatpak in 2026. This guide covers single updates, holding, rollbacks, and troubleshooting for all your

How to Update Package Ubuntu: The Complete Guide 2026

You SSH into an Ubuntu box for a quick fix, and the login banner reminds you that updates are waiting. That should be simple. Then the usual questions start. Do you just run apt update? Should you use apt upgrade or apt full-upgrade? Is this an APT package at all, or did someone install it as a Snap?

That confusion is normal because most guides treat package updates like a command lookup problem. It isn't. Updating package Ubuntu systems safely is a decision problem. You're balancing security, stability, dependency changes, rollout timing, and how much surprise you can tolerate on that machine.

A laptop, a dev workstation, and a production server should not all follow the same habit. The commands may overlap, but the strategy doesn't.

Table of Contents#

Why Just Running Commands Is Not an Update Strategy#

A lot of people search for update package Ubuntu when what they really want is one of three different outcomes. Refresh the package catalog. Install newer package versions. Patch one specific package without disturbing the rest of the machine. Those are different jobs, and Ubuntu treats them differently.

That matters because package updates are where convenience and risk meet. If you treat every update prompt the same way, you eventually hit a machine that needed caution instead of speed. Kernel transitions, library changes, third party repositories, and service restarts don't care that you were in a hurry.

A healthy Ubuntu system isn't the one that updates fastest. It's the one that updates predictably.

For developer workstations, predictability usually means you can accept broad package movement more often. For production servers, predictability usually means you update on purpose, with logs, rollback thinking, and a clear understanding of whether a dependency change is involved. If you manage fleets, config management matters even more than the command itself. A practical next step is CloudCops' guide to Ansible, because manual patching habits don't scale cleanly once you're responsible for more than a handful of machines.

There's also an operational blind spot that often goes unaddressed. The runbook for updates is often worse than the update process. People leave behind half-written notes, screenshots, or tribal knowledge in chat threads. Then the next admin repeats old mistakes. Good update hygiene includes clear internal procedures, especially when machines are maintained by multiple people over time.

The Core Ubuntu Update Workflow#

A lot of update mistakes start with one bad assumption. Someone runs apt update, sees a wall of package names fly by, and walks away thinking the machine is current. It is not. apt update refreshes what Ubuntu knows about available packages. apt upgrade is the step that changes the system.

A Dell computer monitor displays an Ubuntu terminal running an apt package update command on a desk.

What apt update does#

Start with:

Bash
sudo apt update

This command refreshes the local package index from your configured repositories. It does not install newer versions of anything you already have. If the metadata on the machine is stale, every decision after that is based on old information. That is why I treat apt update as the inventory step, not the patching step.

If you want to inspect before changing packages, run:

Bash
apt list --upgradable

That gives you a readable list of what APT can move after the index refresh. It is a good habit on servers, especially if you care about restart windows, package pinning, or third party repositories that can surprise you.

The basic workflow is straightforward:

  1. Refresh metadata
    Run sudo apt update.

  2. Review pending changes if needed
    Run apt list --upgradable.

  3. Apply updates
    Run sudo apt upgrade for the standard path.

Core principle: apt update tells your system what could be updated. apt upgrade is what installs newer package versions.

If your team wants this process done the same way every time, write it down in engineering runbooks for recurring system maintenance. Update quality usually breaks at the handoff, not at the command line.

When to use upgrade and when to use full-upgrade#

For routine maintenance, use:

Bash
sudo apt upgrade

This is the conservative default. It installs newer versions for packages that can be updated without removing packages or pulling in disruptive dependency changes. On workstations, that usually means less surprise. On servers, it usually means a smaller blast radius.

Use this when the system needs dependency changes to complete the update:

Bash
sudo apt full-upgrade

full-upgrade can add, remove, or replace packages to satisfy dependencies. That matters during kernel transitions, driver changes, and larger library updates where the old package set no longer fits cleanly. It is the right tool when Ubuntu needs room to resolve the change set. It is also the command that deserves a quick review before you press Enter.

A simple rule works well in practice. Use upgrade for regular patching. Use full-upgrade when held-back packages, kernel work, or dependency shifts show up and you understand the impact.

SituationBetter commandWhy
Regular package maintenancesudo apt upgradeLower risk, fewer dependency surprises
Kernel or major library transitionsudo apt full-upgradeAllows package additions or removals to resolve dependencies
You want to see what will change firstapt list --upgradable then chooseBetter visibility before action

Two mistakes show up over and over. Admins stop after apt update and assume the host is patched. Or they use full-upgrade as the default on systems where package churn can break expectations. The stable approach is simpler than that. Refresh metadata, inspect when the machine matters, and choose the least aggressive command that gets the job done.

Targeting a Single Package for an Update#

Sometimes a full system upgrade is the wrong move. You may need a newer nginx, a patched runtime, or one library update for a project while leaving everything else untouched. In that case, target the package directly instead of moving the whole machine.

The safe way to update one package#

The cleanest pattern is:

Bash
sudo apt update
sudo apt install --only-upgrade nginx

You can swap nginx for the package you need. This tells APT to upgrade that package if it's already installed, without using the command as a fresh install path.

If you want to inspect before acting, do it in this order:

Bash
sudo apt update
apt list --upgradable

Then look for the package you care about. That gives you a sanity check before changing anything.

You can also use:

Bash
sudo apt install nginx

If nginx is already installed, APT can upgrade it as part of the install action. I still prefer --only-upgrade when I'm being surgical because it makes intent obvious.

When this approach is the right call#

Single-package updates make sense in a few common cases:

  • Critical patching: You need to move one exposed service quickly, such as nginx, without introducing unrelated package churn.
  • Stable dev environments: A project depends on the current state of the workstation, but one tool needs a newer package version.
  • Careful production changes: You want a narrow blast radius and easier troubleshooting if something behaves differently afterward.

A realistic example:

Bash
sudo apt update
sudo apt install --only-upgrade python3

That doesn't mean zero risk. Updating one package can still interact with dependencies and service behavior. But it's a much more controlled move than a full host-wide upgrade when your goal is narrow.

One warning. If the package was installed through Snap or Flatpak instead of APT, these commands won't touch it. Before you try to update package Ubuntu software, verify which package manager owns the app.

Ubuntu isn't an APT-only world anymore. On many systems, you'll see a mix of APT, Snap, and sometimes Flatpak. That's where update confusion starts, because people assume one command updates everything. It doesn't.

A comparison chart of Ubuntu package managers detailing the differences between APT, Snap, and Flatpak.

They solve different problems#

APT is the native system package manager for Ubuntu and other Debian-based systems. It's the right choice for core system components, libraries, developer tools, and services that should integrate tightly with the OS.

Snap packages are more self-contained. Canonical pushes Snap heavily for desktop apps and some server software. The upside is packaging consistency and isolation. The downside is that it can feel less transparent, especially when you want fine-grained control.

Flatpak is common for desktop apps, especially when you want newer app versions across distributions. It's less central to stock Ubuntu administration, but it's common enough that ignoring it leads to bad assumptions.

If you don't know how an app was installed, you don't yet know how to update it.

Package Manager Comparison APT vs Snap vs Flatpak#

FeatureAPT (apt/apt-get)SnapFlatpak
Primary roleSystem packages and core dependenciesUniversal packages with Canonical integrationCross-distribution desktop apps
Typical update commandsudo apt update then sudo apt upgradesudo snap refreshflatpak update
Dependency modelUses shared system librariesBundles more of its own dependenciesBundles runtime layers and app dependencies
OS integrationDeepModerateUsually app-focused rather than system-focused
SandboxingLimited by default package modelYes, package isolation is a core design pointYes, sandboxing is central
Best fitServers, libraries, CLI tools, base systemApps that benefit from self-contained packagingDesktop apps and newer userland software
Main trade-offStable and native, but versions may be conservativeConvenient and isolated, but less predictable feeling for some adminsFlexible for apps, but not a replacement for core OS package management

What I'd choose in practice#

For servers, I'd choose APT first almost every time unless there's a strong reason not to. Core services belong in the package manager that matches the operating system.

For desktop applications, Snap and Flatpak can be perfectly reasonable. A browser, chat client, or design tool doesn't always need deep system integration. In those cases, isolation can be more valuable than purity.

For developer tooling, I still lean toward APT when the tool is part of the base environment. I want one obvious update path, fewer moving parts, and less confusion when I'm troubleshooting. Mixed package sources are manageable, but they increase operational ambiguity.

A bad pattern is forcing one philosophy onto everything. APT is not obsolete because Snap exists. Snap is not automatically wrong because some admins dislike it. Flatpak is not a server package manager. Use each where its trade-offs make sense.

Advanced Control With Holding and Auditing#

Mature Ubuntu administration starts when you stop thinking only in terms of “update all” and start thinking in terms of control. Sometimes the best update decision is to delay one package while you verify compatibility. Other times, the important question is not what should change, but what already changed.

A close-up view of a data center server rack with a hand using a mouse in front.

Holding a package when stability matters more than novelty#

If a package version is known to be sensitive in your environment, hold it:

Bash
sudo apt-mark hold package-name

That prevents normal upgrade flows from moving it forward. To remove the hold later:

Bash
sudo apt-mark unhold package-name

This is useful when:

  • An application depends on a specific library behavior: You need time to test before accepting a newer package.
  • A database or service has version-sensitive plugins: Automatic movement can create avoidable breakage.
  • You're isolating a problem: Holding the package removes one variable while the rest of the system continues receiving updates.

Holding packages is powerful, but it can also become lazy debt. If you hold something, record why and review it later. Permanent holds become hidden fragility.

Auditing what changed after an update#

Ubuntu gives you a built-in audit trail for APT operations. Recently installed or updated packages can be identified from /var/log/apt/history.log and related logs, which record package actions over time and support administrative reporting and rollbacks, as noted in this guide to Ubuntu APT history logs.

For day to day checks, these are the first places to look:

Bash
cat /var/log/apt/history.log
less /var/log/apt/history.log

If you're troubleshooting after a package change, that log is often more useful than memory. It tells you what was installed, upgraded, or removed, and in what sequence.

Operational habit: When a system starts acting differently after maintenance, check the APT history before you start guessing.

I've seen admins waste time blaming the wrong change because they didn't verify the package history first. The log usually settles the argument quickly.

Automating Security With Unattended Upgrades#

A server that gets patched only when someone remembers is already off policy. That is the primary value of unattended upgrades. They reduce the number of security fixes waiting on a human, which is exactly where routine maintenance fails.

Screenshot from https://dokly.co

What should be automated#

Automate security updates first. Treat broader package churn as a separate decision.

That line matters because not every update carries the same risk. Some package updates are simple version bumps. Others pull in new dependencies, replace packages, or remove old ones to satisfy dependency changes. As noted earlier, that is the difference between a routine upgrade path and the more aggressive behavior you allow with full-upgrade. For production systems, I want those dependency-changing moves reviewed unless the host is disposable or very well tested.

A practical policy usually looks like this:

  • Security-only automation: A strong default for internet-facing servers and general-purpose VMs.
  • Feature updates and dependency shifts: Schedule these during a maintenance window.
  • Stateful or customer-facing systems: Patch automatically only if you understand restart behavior and have rollback options.

If you need tighter control over timing, read Fivenines' guide to cron jobs. Even if you stick with Ubuntu's native tooling, cron knowledge helps when you need to coordinate patch windows, service checks, or post-update scripts.

Teams managing many Ubuntu hosts should document the update policy somewhere operators will use. A shared runbook or ops documentation setup for IT teams is better than tribal knowledge about which machines patch themselves and which ones wait for approval.

Where automation goes wrong#

The common failure is not the tool. It is unclear policy.

Unattended updates should answer a few boring questions before you enable them. Which repositories are allowed. Whether package installs can trigger service restarts. Who reviews the logs. What happens if one host updates cleanly and another starts failing health checks an hour later. If those answers are missing, automation just hides risk until something breaks at 3 a.m.

Good unattended update setups usually include:

  • Narrow scope: Auto-install the updates you trust without review.
  • Restart awareness: Know which packages can bounce services and whether that is acceptable.
  • Verification: Check logs and host health after updates instead of assuming success.
  • Response ownership: Make it clear who investigates failed upgrades or unexpected behavior.

This walkthrough from Dokly's official channel is useful if you want a visual break before standardizing the process:

Automation works well when the scope is deliberate and the review loop still exists. It causes trouble when teams use it as a substitute for owning package changes.

Troubleshooting Common Ubuntu Update Issues#

Most Ubuntu update failures aren't mysterious. They're usually one of a few familiar problems: packages are kept back, dependencies are broken, or a third party repository is causing trust or metadata errors. The fix starts with understanding the category.

Why packages get kept back#

Users often assume “kept back” means something is broken. Often, it doesn't. Ubuntu guidance notes that packages may be delayed by phased rollouts, which intentionally hold some updates back for a subset of users to reduce regressions. In other words, not updating can be a safety feature rather than a malfunction, as explained in Framework's Ubuntu update best practices article.

That changes the right response. If a package is kept back, don't immediately force it just because it feels incomplete.

Use a simple check sequence:

  1. Refresh metadata again:
    Run sudo apt update to make sure you're looking at current package information.

  2. Inspect pending upgrades:
    Run apt list --upgradable and see whether the held package is part of a broader dependency shift.

  3. Decide whether this host needs urgency:
    A developer workstation and a production server do not need the same impatience.

“Kept back” is often a clue to slow down, not speed up.

Broken packages and third party repo messes#

If APT reports broken dependencies, start with:

Bash
sudo apt --fix-broken install

That won't solve every problem, but it's the right first repair attempt when package relationships are inconsistent.

Third party repositories are another common source of pain. PPAs and vendor repos can fail because of signing key issues, stale metadata, or package conflicts. When that happens, don't keep layering commands on top of a bad repository state.

Use this pattern instead:

  • Identify the offending repo: Read the exact APT error output and isolate the repository causing it.
  • Disable or remove the problematic source: If a PPA is stale or untrusted, stop using it before proceeding.
  • Retry the normal APT flow: Go back to sudo apt update only after the source list is clean.

The key skill here isn't memorizing rescue commands. It's keeping enough documentation discipline that update failures are reproducible and understandable. If your team needs examples of what good operational docs look like, these sample technical documents are a useful benchmark for structure and clarity.


If your team's update procedures still live in chat threads, stale wikis, or somebody's head, Dokly is the clean fix. It gives you a fast way to turn Ubuntu maintenance habits, SOPs, and troubleshooting notes into structured documentation that people can effectively use. Unlike heavier doc stacks that add setup overhead before you've written a word, Dokly stays simple, publishes cleanly, and makes operational knowledge easier to keep current. That's the difference between having update commands and having a dependable update process.

Written by Gautam Sharma, Founder Dokly

Building Dokly — documentation that doesn't cost a fortune. AI-ready docs out of the box.

Follow on X →
Start for free

Ready to build better docs?

Start creating beautiful, AI-ready documentation with Dokly today. No git, no YAML, no friction.

Get started free