Website Vidya
Linux & ServersStep-by-Step Guide

apt update vs apt upgrade vs apt full-upgrade

Understand apt update vs apt upgrade vs apt full upgrade differences, package index handling, dependency resolution, and safe Ubuntu maintenance workflows.

RR
Rajesh RayLead Systems Educator
Published:
6 min read
PDF Cheat Sheet
apt update vs apt upgrade vs apt full-upgrade
AI Executive SummaryWebsiteVidya AI

6 min read

Understand apt update vs apt upgrade vs apt full upgrade differences, package index handling, dependency resolution, and safe Ubuntu maintenance workflows.

Key Highlights
  • Prerequisites and Supported Releases
  • The Core Differences at a Glance
  • Deep Dive 1: What apt update Does
Grounded in full engineering runbookWebsiteVidya AI Engine

Managing system updates is one of the most frequent administrative responsibilities on Debian and Ubuntu servers.

Beginners and seasoned system administrators alike frequently wonder how apt update, apt upgrade, and apt full-upgrade differ in practice.

Running the wrong upgrade command in a production environment can inadvertently remove critical packages, disrupt dependent services, or introduce breaking configuration changes.

Understanding how the Advanced Package Tool (APT) manages repository indexes, state databases, and dependency resolution algorithms is essential for keeping servers secure without downtime.

Advertisement

In this guide, we demystify apt update vs apt upgrade vs apt full upgrade with detailed comparisons, real-world examples, and step-by-step terminal demonstrations.

Prerequisites and Supported Releases

This guide is thoroughly verified on Ubuntu 24.04 LTS (Noble Numbat) & Ubuntu 22.04 LTS. The instructions apply cleanly to cloud instances (AWS EC2, Google Compute Engine, DigitalOcean, Hetzner), bare-metal servers, and local virtual machines.

Before proceeding, ensure you have the following requirements satisfied:

Advertisement
  • An active installation of Ubuntu (24.04 LTS, 22.04 LTS) or Debian (12 Bookworm, 11 Bullseye).
  • A user account with administrative sudo privileges.
  • Access to a bash terminal shell.
  • Basic understanding of software packages and repositories.

The Core Differences at a Glance

Before analyzing each command in detail, review this quick architectural summary of how each command interacts with your operating system:

APT divides software maintenance into two distinct phases: refreshing repository metadata and applying binary package upgrades.

CommandPrimary ActionInstalls New Packages?Removes Existing Packages?Upgrades Kernel?
apt updateSynchronizes package index metadata from remote repositoriesNoNoNo
apt upgradeUpgrades installed packages to newest versions without removalsYes (if required as new deps)No (conservative)Only non-breaking minor patches
apt full-upgradePerforms comprehensive upgrades, resolving complex dependency changesYesYes (removes conflicting packages)Yes (installs new kernel images & ABIs)

Deep Dive 1: What apt update Does

The apt update command does not modify or upgrade any installed software packages on your system.

Instead, it contacts all package repositories configured in /etc/apt/sources.list and /etc/apt/sources.list.d/.

Advertisement

It downloads updated Release and Packages.gz index files, comparing local version databases against the remote upstream repositories.

sudo apt update

# Terminal output breakdown:
Hit:1 http://archive.ubuntu.com/ubuntu noble InRelease
Get:2 http://archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]
Get:3 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB]
Get:4 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [345 kB]
Fetched 597 kB in 1s (523 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
12 packages can be upgraded. Run 'apt list --upgradable' to see them.

Inspecting Upgradable Packages Before Upgrading

After running apt update, inspect the list of available package updates without changing system state.

Use the apt list --upgradable command to see exact version deltas and target repositories:

apt list --upgradable

# Output:
Listing... Done
curl/noble-updates 8.5.0-2ubuntu10.4 amd64 [upgradable from: 8.5.0-2ubuntu10.3]
libcurl4t64/noble-updates 8.5.0-2ubuntu10.4 amd64 [upgradable from: 8.5.0-2ubuntu10.3]
openssh-server/noble-updates 1:9.6p1-3ubuntu13.4 amd64 [upgradable from: 1:9.6p1-3ubuntu13.3]

Deep Dive 2: What apt upgrade Does

Once your local package index is current, apt upgrade downloads and installs the newest versions of all currently installed packages.

Crucially, apt upgrade operates under a strict conservative rule: under no circumstances will it remove an existing package to satisfy a dependency conflict.

If a package requires removing an older library or application, apt upgrade holds that package back rather than deleting software.

sudo apt upgrade

# Terminal execution prompt:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  curl libcurl4t64 openssh-client openssh-server
4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,842 kB of archives.
After this operation, 14.3 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y

The Phenomenon of Kept Back Packages

You may frequently encounter a notification stating: The following packages have been kept back.

This occurs when an updated package introduces new dependency packages or conflicts with installed libraries.

Ubuntu utilizes phased updates to roll out changes progressively; if you need to upgrade held packages safely, apt install will install the required dependencies cleanly.

Deep Dive 3: What apt full-upgrade Does

The apt full-upgrade command (formerly known as apt-get dist-upgrade) performs an aggressive, intelligent upgrade across all packages.

Unlike standard upgrade, full-upgrade possesses the authority to uninstall obsolete or conflicting packages to satisfy dependency trees.

This command is mandatory when updating the Linux kernel to a new ABI series, upgrading distribution point releases, or resolving complex package refactorings.

sudo apt full-upgrade

# Terminal execution prompt:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  linux-headers-6.8.0-45-generic linux-image-6.8.0-45-generic
The following packages will be REMOVED:
  linux-headers-6.8.0-38-generic linux-image-6.8.0-38-generic
The following packages will be upgraded:
  linux-generic udev systemd
3 upgraded, 2 newly installed, 2 to remove and 0 not upgraded.
Do you want to continue? [Y/n]

Safety Rules Before Executing full-upgrade

Always review the list of packages marked for removal before pressing Y.

If APT proposes removing critical server daemons (such as nginx, docker-ce, or postgresql), cancel the operation immediately with N and investigate package pinning.

To keep your Ubuntu servers reliable, follow a deterministic routine during routine maintenance windows.

First, update indexes and check for security-specific packages, then perform standard upgrades, clean orphan packages, and check if a reboot is needed:

# 1. Refresh package index
sudo apt update

# 2. Inspect available updates
apt list --upgradable

# 3. Apply safe package upgrades
sudo apt upgrade -y

# 4. Remove unused dependency packages
sudo apt autoremove --purge -y

# 5. Clean downloaded deb archive caches
sudo apt clean

# 6. Check if system reboot is required (kernel/glibc patches)
if [ -f /var/run/reboot-required ]; then
  echo "System reboot required!"
  cat /var/run/reboot-required.pkgs
fi

Troubleshooting and Common Errors

When configuring Ubuntu servers, unexpected permission errors, network timeouts, or lock contention can occur. Review these common issues and verified resolutions:

The following packages have been kept back

Cause: New upstream dependencies conflict with current packages, or Ubuntu Phased Updates is gradually testing the rollout.

Resolution: Target the specific package explicitly with apt install <package-name>, or review apt full-upgrade to verify what will be removed.

sudo apt install --only-upgrade <package-name>

apt update returns Hash Sum mismatch or Failed to fetch

Cause: Corrupted local package metadata cache or proxy caching issue.

Resolution: Remove the local package lists and re-run apt update from scratch.

sudo rm -rf /var/lib/apt/lists/* && sudo apt update

Broken dependencies error (E: Unmet dependencies)

Cause: An interrupted installation or missing secondary dependency.

Resolution: Instruct APT to repair broken dependency trees using the -f flag.

sudo apt --fix-broken install

Security Best Practices and Hardening

Always execute apt update immediately prior to running any installation or upgrade command to ensure you retrieve signed cryptographic hashes.

Review the contents of /var/run/reboot-required after kernel or OpenSSL upgrades to ensure active processes do not run with unpatched memory segments.

Avoid running apt full-upgrade -y in non-interactive cron jobs without automated staging and snapshot rollbacks.

Deepen your Linux system administration skills with our related production-tested guides:

Authoritative References and Official Documentation

Frequently Asked Questions

Quick answers to common questions and configurations

4 FAQs
No. apt update only downloads and updates the index lists of available packages from the configured repositories. It refreshes metadata in /var/lib/apt/lists/ without installing or updating any binaries.
They perform the exact same operational task. apt full-upgrade is the modern syntax provided by the user-facing apt command, while apt-get dist-upgrade is the traditional plumbing command used in scripts and legacy documentation.
When packages are updated or removed, older orphan dependencies (such as obsolete kernel headers or transitional libraries) remain on disk. Running sudo apt autoremove --purge frees disk space and maintains a clean filesystem.
Check if the file /var/run/reboot-required exists. You can inspect which packages triggered the reboot requirement by reading /var/run/reboot-required.pkgs.
RR
Written byVerified Author

Rajesh Ray

I’m Rajesh Rai, a full-stack developer, Linux administrator, and technology enthusiast passionate about making complex technology easier to understand and use.

SPAM-FREE MODERATED DISCOURSE

Join the Conversation & Perspective

Have thoughts, counterpoints, or reflections on this story? Engage directly with fellow readers and editorial contributors.

AT
MP
JV
+2

No comments on this guide yet. Be the first to share your thoughts or ask a question!

Recommended Reading10 Guides

Related Technical Guides

Tested runbooks, server administration walkthroughs, and troubleshooting guides

Featured Infrastructure PartnerUp to 75% OFF + 3 Months Free

Supercharge Your Linux & Cloud Workloads with Hostinger

Deploy high-speed NVMe KVM VPS, Docker containers, and LiteSpeed-accelerated WordPress servers in under 60 seconds with full root access, dedicated IPv4, and 24/7 technical support.

Pure NVMe SSD StorageFull Root Access & SSHFree Domain & Unlimited SSL99.9% Uptime SLA
Plans from$2.99/mo
Claim Hostinger DealAffiliate link • Special discount applied at checkout