web-dev-qa-db-ja.com

aptおよびapt-getの異なるパッケージのアップグレード

今日は、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 updateSudo apt-get updateの出力はすでに確認しましたが、どちらも同じパッケージソースを使用しています。

今、私はこれが何についてなのか疑問に思います。

3

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).

お役に立てれば!

3
Terrance