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.
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-upgradeThey 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 updateDespite 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 updatethen retrieves current information from those repositories.
Think of it as:
Repository configuration
↓
apt update
↓
Refresh local package indexes
↓
APT knows what newer packages are availableIt does not install or upgrade those packages.
For example:
$ sudo apt updatemight 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 upgradeapt upgrade upgrades installed packages when newer versions are available, while avoiding the removal of installed packages.
For example:
$ sudo apt update
$ sudo apt upgradeThis 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-packageThat 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-upgradeallows 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 packagesversus:
apt full-upgrade
│
└── Upgrade packages
while allowing dependency-driven
package additions and removalsA 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 YesThis 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-upgradeAPT 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-upgradeapt-get and apt are closely related interfaces to the APT package-management system.
For interactive administration, modern Debian and Ubuntu documentation commonly uses:
aptFor example:
$ sudo apt update
$ sudo apt upgrade
$ sudo apt full-upgradeapt-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-upgradecorresponds conceptually to the more modern:
$ apt full-upgradeThe 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-upgradeThis 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 BA 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 upgradewhich 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 upgradedoes 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.04A release upgrade is different:
Ubuntu 24.04
│
└── do-release-upgrade
│
▼
New Ubuntu releaseThe 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 upgradeIf the system has packages requiring dependency changes, you may also need:
$ sudo apt full-upgradeAfter 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-upgradeThe 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 packagesThen:
apt upgrade
↓
Upgrade installed packages
↓
Avoid removing installed packagesThen:
apt full-upgrade
↓
Upgrade installed packages
↓
May add or remove packages
↓
Can resolve more substantial dependency changesAnd finally:
do-release-upgrade
↓
Upgrade Ubuntu itself
↓
Move from one Ubuntu release to anotherWhich Command Should You Use?
For ordinary package maintenance:
$ sudo apt update
$ sudo apt upgradeis a sensible starting point.
If packages are being held back because dependency changes are required:
$ sudo apt full-upgrademay be appropriate.
If your objective is to move from one Ubuntu release to another:
$ sudo do-release-upgradeis 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-upgradeIf 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 updateRefreshes package information.
apt upgradeUpgrades installed packages without removing packages to resolve dependency changes.
apt full-upgradePerforms a more comprehensive package upgrade and may install or remove packages when required by dependency changes.
do-release-upgradeUpgrades 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.