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.

6 min read
Understand apt update vs apt upgrade vs apt full upgrade differences, package index handling, dependency resolution, and safe Ubuntu maintenance workflows.
- Prerequisites and Supported Releases
- The Core Differences at a Glance
- Deep Dive 1: What apt update Does
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.
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.
Clear, practical breakdown of the core Debian and Ubuntu package management commands: apt update, apt upgrade, and apt full-upgrade. Explains when to refresh metadata, how dependency resolution alters package states, when packages are held back, and how to safely execute unattended maintenance.
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:
- An active installation of Ubuntu (24.04 LTS, 22.04 LTS) or Debian (12 Bookworm, 11 Bullseye).
- A user account with administrative
sudoprivileges. - 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.
| Command | Primary Action | Installs New Packages? | Removes Existing Packages? | Upgrades Kernel? |
|---|---|---|---|---|
apt update | Synchronizes package index metadata from remote repositories | No | No | No |
apt upgrade | Upgrades installed packages to newest versions without removals | Yes (if required as new deps) | No (conservative) | Only non-breaking minor patches |
apt full-upgrade | Performs comprehensive upgrades, resolving complex dependency changes | Yes | Yes (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/.
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.
Recommended Production Maintenance Workflows
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.
Related Ubuntu Tutorials and Documentation
Deepen your Linux system administration skills with our related production-tested guides:
apt vs apt-get: The Difference and When to Use Each— Learn when to use the interactive apt command vs script-friendly apt-get.- How to Fix APT and dpkg Lock Errors on Ubuntu and Debian — Resolve frontend lock errors and recover stalled package manager sessions.
- Initial Server Setup on Ubuntu 24.04 LTS — Set up security, sudo users, and automated updates on fresh Ubuntu instances.
Authoritative References and Official Documentation

The Linux Command Line, 2nd Edition: A Complete Introduction
Frequently Asked Questions
Quick answers to common questions and configurations
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.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.sudo apt autoremove --purge frees disk space and maintains a clean filesystem./var/run/reboot-required exists. You can inspect which packages triggered the reboot requirement by reading /var/run/reboot-required.pkgs.Editorial Disclosure: Website Vidya is supported by our readers. When you purchase hosting, tools, or software through our verified partner links, we may earn an affiliate commission at no extra cost to you. We only recommend solutions we trust and rigorously verify.
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.
Most Read Guides
TrendingUbuntu Server Not Booting? 10 Simple Steps to Fix It Fast
How to Create a 3D Button in HTML and CSS: Easy Steps
How to Install Python and Pip on Ubuntu 24.04 LTS
How to Install Nginx on Ubuntu 24.04
How to Install Python on Ubuntu 24.04 LTS
Related Technical Guides
Tested runbooks, server administration walkthroughs, and troubleshooting guides
Join the Conversation & Perspective
Have thoughts, counterpoints, or reflections on this story? Engage directly with fellow readers and editorial contributors.
No comments on this guide yet. Be the first to share your thoughts or ask a question!