apt upgrade full-upgrade or dist-upgrade, what to use?
Colin Watson
cjwatson at ubuntu.com
Fri Sep 19 09:45:32 UTC 2025
On Fri, Sep 19, 2025 at 08:37:13AM +0200, Bo Berglund wrote:
>I am on Ubuntu server 24.04.3 LTS
>
>About a year ago I changed my habits to use:
>
>sudo apt update && sudo apt full-upgrade
>
>but now I see in a post here use of dist-upgrade and I don't know the difference
>between them (are there still other variations?).
This has gone through several variations over time, and people tend to
stick with what they know, so you'll see some variation as a result.
The tl;dr to your question is that you don't need to worry about this.
Details follow for reference.
"apt full-upgrade" and "apt dist-upgrade" are exact synonyms.
"apt-get full-upgrade" and "apt-get dist-upgrade" are also exact
synonyms for each other. They're also synonyms for the "apt" variants
in the sense that they run the same basic logic, but they have an older
user interface style.
I believe that nowadays "apt full-upgrade" is the most preferred form,
so it's fine to carry on using that if you're already comfortable with
it.
My understanding is that the APT maintainers added "full-upgrade"
because some people got (and still get) the wrong idea from the name
"dist-upgrade". To some people, the name gives the impression that it's
just for use when upgrading between different distribution releases.
While you do indeed have to use that logic or something based on it when
doing that, it's also fine to just use it all the time as long as you're
comfortable checking that any suggested package removals are
appropriate.
The exact set of rules for the various upgrade commands is as follows
(this is all from a combination of the documentation and poking around
in the code, but the layout is my own; hopefully it survives the journey
to your mail client):
* apt upgrade --no-new-pkgs
apt-get upgrade
[x] Upgrade to new versions of packages that are already installed
[ ] Never install new packages that aren't already installed
[ ] Never remove packages that are currently installed
Hold back upgrades if they would require installing new packages or
removing existing ones. (This means, for example, that any upgrade
pulling in a new library will be held back.)
* apt upgrade
apt-get upgrade --with-new-pkgs
[x] Upgrade to new versions of packages that are already installed
[x] Install new packages if needed to satisfy dependencies
[ ] Never remove packages that are currently installed
A more relaxed version of the above, because in practice it was often
too strict and held back upgrades unnecessarily.
* apt full-upgrade
apt dist-upgrade
apt-get full-upgrade
apt-get dist-upgrade
[x] Upgrade to new versions of packages that are already installed
[x] Install new packages if needed to satisfy dependencies
[x] Remove existing packages if needed to satisfy dependencies
This is the most "complete" version, but you do need to check that
the suggested removals are sensible. Some of the UI changes in
modern versions of apt (compared to apt-get) were designed to make it
easier to see removals at a glance.
do-release-upgrade is a separate thing on top, which _is_ specifically
for upgrading between different Ubuntu releases. The original idea
there was "executable release notes": that is, it's supposed to be able
to drive the whole process and apply various "quirks" as needed to
adjust for special cases. These days the basic tools and packaging QA
are much better, so in my personal opinion the need for that sort of
thing has been greatly reduced; if you're generally comfortable with the
command line, I think you're fine to just use the regular apt tools for
upgrading between releases as well.
--
Colin Watson (he/him) [cjwatson at ubuntu.com]
More information about the ubuntu-users
mailing list