今日は、Sudo apt upgrade
の代わりにSudo apt-get upgrade
を試してみたかったのですが、何らかの理由で結果が互いに異なります。
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
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
ご覧のとおり、apt-get
は6個のパッケージのみをアップグレードし、11個を保持しますが、apt
は17個すべてのアップグレードを提供します。さらにapt
は10個のパッケージの新規インストールを試みます。
Sudo apt update
とSudo apt-get update
の出力はすでに確認しましたが、どちらも同じパッケージソースを使用しています。
今、私はこれが何についてなのか疑問に思います。
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.
したがって、依存関係を満たすために、apt
は新しいアプリケーションをインストールします。 apt-get
にはunder no circumstances are currently installed packages removed, or packages not already installed retrieved and installed
と記載されています。 held back
によってapt-get
になっているアプリケーションは、upgrade
アプリケーションだけで実行する場合のように、apt
の代わりにdist-upgrade
として実行します。
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.
そして、両方の説明:
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).
お役に立てれば!