apt and apt-get - was Re: follow-up (and problems) about: recommendation for all-in-one printer?
Bret Busby
bret.busby at gmail.com
Fri Nov 6 21:59:04 UTC 2020
On 06/11/2020, Colin Watson <cjwatson at ubuntu.com> wrote:
> On Fri, Nov 06, 2020 at 02:45:51PM +0100, Liam Proven wrote:
>> `apt upgrade` is the equivalent of `apt-get upgrade`. It installs new
>> versions of existing packages but it will not add packages or
>> additional dependencies.
>
> Not quite. "apt-get upgrade" will never add packages (it will instead
> hold upgrades if there are new dependencies that require adding
> packages), while "apt upgrade" will add packages if necessary to satisfy
> new dependencies.
>
> Neither will ever *remove* packages, though.
>
> My understanding is that the reason for this change in semantics from
> "apt-get upgrade" to "apt upgrade" is that needing to add packages is
> quite common across things like library ABI changes and is generally
> relatively harmless, so the behaviour of "apt-get upgrade" was a bit too
> annoyingly conservative in practice.
>
>> `apt full-upgrade` is the equivalent of the old `apt-get
>> dist-upgrade`. If a new version needs a new dependency or library or
>> something, it will do it.
>
> As does "apt upgrade" (but not "apt-get upgrade"). The difference
> between "apt upgrade" and "apt full-upgrade" is that the former will
> hold upgrades if there are new conflicts that require removing packages,
> while the latter will remove packages if necessary to satisfy new
> conflicts.
>
> (I agree with the recommendation to use "apt full-upgrade" in most
> cases.)
>
> --
> Colin Watson (he/him) [cjwatson at ubuntu.com]
>
So, for clarity, what then, is the better syntax for the following command?
sudo apt-get -y update && sudo apt-get -y dist-upgrade && sudo apt-get
-y autoremove && sudo apt-get -y autoclean
Thank you in anticipation.
--
Bret Busby
Armadale
West Australia
..............
More information about the ubuntu-users
mailing list