Re:Debian 10.6
by 6c696e7578 on Saturday September 26, 2020 @09:42AM
(#24598789)
Should do it, I like to include a dist-upgrade at the end to do additional tidying if dependencies have changed dramatically.
[ Parent
| on HN ]
Is there a difference between doing "apt upgrade" followed by "apt dist-upgrade" vs only doing "apt dist-upgrade"?
Re:Debian 10.6
by 6c696e7578 on Saturday September 26, 2020 @10:03AM
(#24598928)
The man page is many times better than me at explaining it:
upgrade
upgrade is used to install the newest versions of all packages
currently installed on the system from the sources enumerated in
/etc/apt/sources.list. Packages currently installed with new
versions available are retrieved and upgraded; under no
circumstances are currently installed packages removed, or packages
not already installed retrieved and installed. New versions of
currently installed packages that cannot be upgraded without
changing the install status of another package will be left at
their current version. An update must be performed first so that
apt-get knows that new versions of packages are available.
dist-upgrade
dist-upgrade in addition to performing the function of upgrade,
also intelligently handles changing dependencies with new versions
of packages; apt-get has a "smart" conflict resolution system, and
it will attempt to upgrade the most important packages at the
expense of less important ones if necessary. The dist-upgrade
command may therefore remove some packages. The
/etc/apt/sources.list file contains a list of locations from which
to retrieve desired package files. See also apt_preferences(5) for
a mechanism for overriding the general settings for individual
packages.There should not be.
The distinction is that "dist-upgrade" is willing to remove packages and "upgrade" is not, on the grounds that outdated packages are common for major version upgrades but not otherwise. So I could imagine a situation where there's a new conflict, and "upgrade" resolves it by finding a different alternative instead of installing something that would conflict, and if you run "dist-upgrade" after "upgrade" it finds that the conflict was already resolved, but that seems rare/unlikely.
Personally I just use "dist-upgrade" always and pay attention to the command line - it tells you pretty clearly if it's going to remove something.
dist-upgrade is more likely to break things because it can uninstall packages. So it's sometimes useful to run a plain upgrade first just so there will be fewer packages in the dist-upgrade. This lets you review the dist-upgrade output closer and perhaps decide to cancel it if you need to make some changes before it's safe to run. If you are going to ignore the output or just run with -y, there's no reason to split them.