Hi Stefan,
never mind. apt is just a wrapper around apt-get and aptitude for
convenience.
So all holds true, one or the other way.
Cheers,
Matt
Am 01.06.23 um 15:56 schrieb Stefan
Baur:
Am
01.06.23 um 15:40 schrieb Buddy Butterfly:
Hi Stefan,
yes, you can trust me, that I always have a "clear" apt
installation with
apt update
apt dist-upgrade
And here's the issue.
a) You should not run "apt dist-upgrade". Never. "dist-upgrade" is
not officially supported by "apt". (It is supported with
"apt-get", as far as I know.)
b) The proper command to use instead is "apt full-upgrade", but
...
c) You should always run "apt upgrade" before attempting a more
invasive command like "apt full-upgrade".
d) You should not use "-y" or a script containing the commands you
listed, unless you are willing to risk breakage AND have a proper
backup.
e) Read, Understand, and Think before you approve an update,
especially if it indicates package removals (which an "apt
upgrade" will never do, unlike an "apt full-upgrade").
apt autoremove --purge
apt autoclean
apt clean
This is how I usually run manual updates on machines, usually
within a "screen" session when I'm logged in remotely, so a
natwork issue won't interrupt any dpkg-configure calls:
apt update
apt full-upgrade -d -y # see explanation below
apt upgrade
apt full-upgrade # optional step
apt autoremove --purge
apt clean
# Explanation: I want all packages to be available locally before
# starting the upgrade, so that any transient network failures
won't
# matter. It'll either fail at the download stage already, which
won't
# break anything, or it will be able to access all packages even
if
# the network fails inbetween.
Again, if any of these commands throw a warning/an error, do not
blindly continue.
IF, AND ONLY IF YOU HAVE A BACKUP THAT YOU HAVE VERIFIED TO BE
WORKING:
apt update && apt full-upgrade -d -y && \
apt upgrade -y && apt full-upgrade -y && \
apt autoremove --purge && apt clean
In your case, apt upgrade should have shown that it has some
packages it cannot upgrade due to unresolved dependencies, but
should have continued to work. The mess only starts after using
dist-upgrade/full-upgrade, because with that, you are actually
authorizing uninstalls. It is basically "Yes, do as I say!"'s
little brother.
Kind Regards,
Stefan Baur