Aujourd'hui, je voulais essayer Sudo apt upgrade
au lieu de Sudo apt-get upgrade
, mais pour une raison quelconque, leurs résultats diffèrent les uns des autres.
sortie de Sudo apt upgrade
:
The following package was automatically installed and is no longer required:
libllvm3.8:i386
Use 'Sudo apt autoremove' to remove it.
The following NEW packages will be installed:
caribou libcapnp-0.5.3 libinput-bin libllvm4.0 libllvm4.0:i386 libmircommon7 libmircore1 libsensors4:i386 python-dbus python-pyatspi
The following packages will be upgraded:
gnome-Shell gnome-Shell-common kmod libappstream-glib8 libegl1-mesa libgbm1 libgl1-mesa-dri libgl1-mesa-dri:i386 libinput10 libkmod2
libmirclient9 libwayland-egl1-mesa libwhoopsie0 libxatracker2 mesa-vdpau-drivers shim-signed whoopsie
17 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 41,4 MB of archives.
After this operation, 123 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
sortie de Sudo apt-get upgrade
:
The following packages have been kept back:
gnome-Shell gnome-Shell-common libegl1-mesa libgbm1 libgl1-mesa-dri libgl1-mesa-dri:i386 libinput10 libmirclient9 libwayland-egl1-mesa
libxatracker2 mesa-vdpau-drivers
The following packages will be upgraded:
kmod libappstream-glib8 libkmod2 libwhoopsie0 shim-signed whoopsie
6 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
Need to get 572 kB of archives.
After this operation, 3.072 B of additional disk space will be used.
Do you want to continue? [Y/n] n
Comme vous pouvez le constater, apt-get
ne met à jour que 6 paquets et en conserve 11 alors que apt
propose de mettre à jour tous les 17. De plus, apt
tente d'installer de nouveaux paquets 10.
J'ai déjà vérifié la sortie de Sudo apt update
et Sudo apt-get update
, mais les deux utilisent les mêmes sources de package.
Maintenant, je me demande de quoi il s'agit.
De man apt
:
upgrade (apt-get(8))
upgrade is used to install available upgrades of all packages
currently installed on the system from the sources configured via
sources.list(5). New packages will be installed if required to
statisfy dependencies, but existing packages will never be removed.
If an upgrade for a package requires the remove of an installed
package the upgrade for this package isn't performed.
Donc, pour satisfaire les dépendances, apt
va installer les nouvelles applications. Où apt-get
indique que under no circumstances are currently installed packages removed, or packages not already installed retrieved and installed
. Si vous utilisez held back
de apt-get
, vous l'exécuterez en tant que dist-upgrade
au lieu de upgrade
comme vous le feriez avec uniquement l'application apt
.
De man apt-get
:
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.
Et les descriptions des deux:
apt provides a high-level commandline interface for the package
management system. It is intended as an end user interface and enables
some options better suited for interactive usage by default compared to
more specialized APT tools like apt-get(8) and apt-cache(8).
apt-get is the command-line tool for handling packages, and may be
considered the user's "back-end" to other tools using the APT library.
Several "front-end" interfaces exist, such as aptitude(8), synaptic(8)
and wajig(1).
J'espère que cela t'aides!