apt upgrade full-upgrade or dist-upgrade, what to use?
Little Girl
littlergirl at gmail.com
Fri Sep 19 07:08:02 UTC 2025
Hey there,
Bo Berglund wrote:
>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?).
Here are the notes I keep on those in my personal wiki:
====================
sudo apt update
* Fetch and update the local list of packages from your current
release's software repository (and third-party repositories if you
use them) to ensure that your system's information about new and
updated packages (your package index) is current without actually
downloading or installing any packages.
sudo apt full-upgrade
* Upgrade all outdated packages that are installed in your current
release and use smart conflict-resolution to remove
currently-installed packages or add new dependencies if needed when
intelligently handling changing dependencies with new versions of
packages.
sudo apt-get dist-upgrade
* Upgrade the entire system to a newer release.
====================
There are lots of other variations or at least other possibilities
that one can run.
My approach is this:
1. I run these commands:
sudo apt update
* See above.
sudo apt full-upgrade
* See above.
sudo snap refresh
* Update (refresh) all Snaps.
2. I reboot if needed and then run these commands:
sudo apt autoremove --purge
* Remove orphaned packages (that are no longer needed) from the local
repository and purge their configuration files.
sudo apt clean
* Remove all packages from the local repository, but do not remove
the lock file from the /var/cache/apt/archives/partial/ directory
and from the /var/cache/apt/archives/ directory.
--
Little Girl
There is no spoon.
More information about the ubuntu-users
mailing list