Difference between apt upgrade, apt full-upgrade, and do-release-upgrade.

Confused by apt upgrade, apt full-upgrade, and do-release-upgrade? They may all sound similar, but they serve very different purposes. Learn how APT handles package updates, dependency changes, and Ubuntu release upgrades—and when to use each.

Difference between apt upgrade, apt full-upgrade, and do-release-upgrade.
Image credit: Unknown. Please contact us if you are the owner.



The Difference Between apt upgrade, apt full-upgrade, and do-release-upgrade

If you manage a Debian- or Ubuntu-based Linux system, you have probably encountered commands such as:

apt update
apt upgrade
apt full-upgrade
do-release-upgrade

They all involve keeping a system up to date, but they do very different things.

The most important distinction is that apt upgrade and apt full-upgrade operate on packages within the current operating-system release, while do-release-upgrade is used to move Ubuntu from one release to another.

Let's break them down.

apt update

Before upgrading packages, you normally start with:

$ sudo apt update

Despite its name, apt update does not update the installed software.

Instead, it downloads the latest package metadata from the repositories configured on the system and updates APT's local package indexes.

Your repository configuration is typically defined through files such as:

/etc/apt/sources.list
/etc/apt/sources.list.d/

Those files tell APT where to obtain packages and package information.

Running:

$ sudo apt update

then retrieves current information from those repositories.

Think of it as:

Repository configuration
        ↓
     apt update
        ↓
Refresh local package indexes
        ↓
APT knows what newer packages are available

It does not install or upgrade those packages.

For example:

$ sudo apt update

might tell you that:

25 packages can be upgraded.

The packages have not been upgraded yet.

apt upgrade

Once the package indexes have been refreshed, you can upgrade installed packages with:

$ sudo apt upgrade

apt upgrade upgrades installed packages when newer versions are available, while avoiding the removal of installed packages.

For example:

$ sudo apt update
$ sudo apt upgrade

This is the normal, conservative package-upgrade operation.

The important part is that apt upgrade does not remove installed packages to resolve dependency changes.

If upgrading a package requires removing an installed package or otherwise changing the package set in a way that apt upgrade will not perform, that particular package may be kept back.

For example, APT might report:

The following packages have been kept back:
  some-package

That does not necessarily mean something is broken.

It can simply mean that completing the upgrade requires a dependency change that apt upgrade is not willing to make.

apt full-upgrade

This is where things become different.

$ sudo apt full-upgrade

allows APT to make more substantial changes to the installed package set in order to resolve dependencies and complete upgrades.

Unlike apt upgrade, apt full-upgrade may:

  • install additional packages
  • remove installed packages
  • upgrade packages that require dependency changes
  • replace packages when required by the dependency relationships

For example, if upgrading package A requires a newer package B, and that dependency change requires removing package C, apt full-upgrade can make those changes.

This does not mean that full-upgrade randomly removes packages.

APT is still following package dependencies and its package-resolution rules.

The important difference is that full-upgrade gives APT permission to change the installed package set when necessary.

apt upgrade vs. apt full-upgrade

The easiest way to remember the difference is:

apt upgrade
    │
    └── Upgrade packages
        without removing installed packages

versus:

apt full-upgrade
    │
    └── Upgrade packages
        while allowing dependency-driven
        package additions and removals

A simple example:

                    apt upgrade       apt full-upgrade
--------------------------------------------------------
Upgrade packages         Yes                Yes
Install dependencies     Limited            Yes
Remove packages          No                 Yes
Resolve dependency
changes requiring
package removal          No                 Yes

This is why full-upgrade can sometimes upgrade packages that apt upgrade leaves behind.

Is apt full-upgrade Dangerous?

Not inherently.

It is sometimes described as something that should only be used with extreme caution, but that gives the wrong impression.

apt full-upgrade is a normal APT operation and can be appropriate for routine system maintenance.

The important difference is that it is allowed to remove packages when the dependency resolver determines that doing so is necessary.

Therefore, you should always read the proposed changes before confirming the operation.

For example:

$ sudo apt full-upgrade

APT will normally present a summary similar to:

The following packages will be upgraded:
  ...

The following NEW packages will be installed:
  ...

The following packages will be REMOVED:
  ...

Do you want to continue? [Y/n]

Pay particular attention to the removal list.

On a production server, this is especially important.

If APT proposes removing something unexpected—particularly a critical service or a large collection of packages—stop and investigate before proceeding.

What About apt-get?

You may also see:

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get dist-upgrade

apt-get and apt are closely related interfaces to the APT package-management system.

For interactive administration, modern Debian and Ubuntu documentation commonly uses:

apt

For example:

$ sudo apt update
$ sudo apt upgrade
$ sudo apt full-upgrade

apt-get remains widely used, particularly in scripts and automation, because its command-line behavior and interface are intended to be more stable for those purposes.

Also note that:

$ apt-get dist-upgrade

corresponds conceptually to the more modern:

$ apt full-upgrade

The terminology can therefore be confusing when moving between older tutorials and current systems.

do-release-upgrade

Now we get to the command that does something fundamentally different:

$ sudo do-release-upgrade

This is not simply another package upgrade command.

do-release-upgrade is an Ubuntu release-upgrade tool used to move an Ubuntu installation from one release to another.

For example, conceptually:

Ubuntu release A
      ↓
do-release-upgrade
      ↓
Ubuntu release B

A release upgrade changes the operating-system release itself.

That means it can involve thousands of package changes, repository changes, dependency changes, configuration changes, and potentially changes to system components such as the kernel.

This is substantially different from:

$ sudo apt upgrade

which upgrades packages within the current Ubuntu release.

Package Upgrade vs. Release Upgrade

This distinction is probably the most important part of the entire article.

Suppose you are running Ubuntu 24.04 LTS.

Running:

$ sudo apt update
$ sudo apt upgrade

does not turn Ubuntu 24.04 into Ubuntu 26.04.

It updates the packages available for your existing Ubuntu release.

Conceptually:

Ubuntu 24.04
    │
    ├── apt update
    │
    ├── apt upgrade
    │
    └── apt full-upgrade
    │
    ▼
Still Ubuntu 24.04

A release upgrade is different:

Ubuntu 24.04
    │
    └── do-release-upgrade
             │
             ▼
       New Ubuntu release

The exact release path available to you depends on Ubuntu's release-upgrade policy and which releases are currently offered for your installation.

Should You Run apt upgrade Before do-release-upgrade?

A system should be fully updated and in a healthy package state before attempting a release upgrade.

A typical preparation sequence is:

$ sudo apt update
$ sudo apt upgrade

If the system has packages requiring dependency changes, you may also need:

$ sudo apt full-upgrade

After ensuring the current release is fully updated and there are no unresolved package-management problems, the release upgrade can be initiated with:

$ sudo do-release-upgrade

The exact preparation requirements can vary with the Ubuntu release and upgrade path, so Ubuntu's current release-upgrade documentation should take precedence over any fixed command sequence in an older tutorial.

A Simple Mental Model

If you remember nothing else, remember this:

apt update
    ↓
Refresh package information
    ↓
Does NOT upgrade packages

Then:

apt upgrade
    ↓
Upgrade installed packages
    ↓
Avoid removing installed packages

Then:

apt full-upgrade
    ↓
Upgrade installed packages
    ↓
May add or remove packages
    ↓
Can resolve more substantial dependency changes

And finally:

do-release-upgrade
    ↓
Upgrade Ubuntu itself
    ↓
Move from one Ubuntu release to another

Which Command Should You Use?

For ordinary package maintenance:

$ sudo apt update
$ sudo apt upgrade

is a sensible starting point.

If packages are being held back because dependency changes are required:

$ sudo apt full-upgrade

may be appropriate.

If your objective is to move from one Ubuntu release to another:

$ sudo do-release-upgrade

is the relevant tool.

They are not interchangeable.

Before You Upgrade a Production Server

On a production system, don't treat package upgrades as something to execute blindly.

Before running a potentially disruptive upgrade, consider:

  • What packages are going to change?
  • Are any packages going to be removed?
  • Are important services affected?
  • Is the system backed up?
  • Do you have console or recovery access?
  • Are you inside a maintenance window?
  • Are there active dependency or repository problems?

For example, before accepting a full-upgrade, carefully review the proposed changes:

$ sudo apt full-upgrade

If the proposed package removals are unexpected, don't simply press Y.

Investigate first.

For release upgrades, the same principle applies even more strongly. A release upgrade is a significantly larger operation than a normal package upgrade and should be planned accordingly.

Although apt upgrade, apt full-upgrade, and do-release-upgrade all sound like different versions of the same operation, they serve different purposes.

apt update

Refreshes package information.

apt upgrade

Upgrades installed packages without removing packages to resolve dependency changes.

apt full-upgrade

Performs a more comprehensive package upgrade and may install or remove packages when required by dependency changes.

do-release-upgrade

Upgrades Ubuntu from one release to another.


The key is to understand what level of change you are asking the system to make.

Updating package information is one operation.
Upgrading packages within the current release is another.
Changing the Ubuntu release itself is an entirely different operation.

Knowing the difference is essential for maintaining Debian- and Ubuntu-based systems safely—especially when you're working with production infrastructure.

We hope you now have a clearer understanding.

Keep Us Caffeinated  ⦿ ⦿
Spotify Logo
↑
SNUBmonkey Join our readers