Better output for apt upgrade possible?

Solution 1:

You can get this better output by asking for more verbose version output (-V, --verbose-versions, see man apt-get):

# apt upgrade -V
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
   apt (1.6.2 => 1.6.8)
   base-files (10.1ubuntu2 => 10.1ubuntu2.3)
   bsdutils (1:2.31.1-0.4ubuntu3.1 => 1:2.31.1-0.4ubuntu3.3)
   [...]
   util-linux (2.31.1-0.4ubuntu3.1 => 2.31.1-0.4ubuntu3.3)
26 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 8002 kB of archives.
After this operation, 46.1 kB of additional disk space will be used.
Do you want to continue? [Y/n]

Also see apt list --upgradable (has highlighted output!):

$ apt list --upgradable
Listing... Done
apt/bionic-updates 1.6.8 amd64 [upgradable from: 1.6.2]
base-files/bionic-updates 10.1ubuntu2.3 amd64 [upgradable from: 10.1ubuntu2]
[...]
util-linux/bionic-updates 2.31.1-0.4ubuntu3.3 amd64 [upgradable from: 2.31.1-0.4ubuntu3.1]

Solution 2:

I see two solutions:

  1. use simulation in apt/apt-get:

    $ sudo apt dist-upgrade --simulate
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Calculating upgrade... Done
    The following packages were automatically installed and are no longer required:
      linux-headers-4.15.0-20 linux-headers-4.15.0-20-generic linux-image-4.15.0-20-generic linux-modules-4.15.0-20-generic
      linux-modules-extra-4.15.0-20-generic
    Use 'sudo apt autoremove' to remove them.
    The following NEW packages will be installed:
      libllvm7 libwayland-egl1
    The following packages will be upgraded:
      apt apt-utils bsdutils cups cups-bsd cups-client cups-common cups-core-drivers cups-daemon cups-ipp-utils cups-ppdc cups-server-common
      deja-dup e2fsprogs fdisk gir1.2-nma-1.0 gir1.2-totem-1.0 gjs gnome-shell-extension-ubuntu-dock grub-common grub-pc grub-pc-bin
      grub2-common gvfs gvfs-backends gvfs-bin gvfs-common gvfs-daemons gvfs-fuse gvfs-libs irqbalance kmod libapt-inst2.0 libapt-pkg5.0
      libasound2 libasound2-data libblkid1 libcairo-gobject2 libcairo2 libcom-err2 libcups2 libcupscgi1 libcupsimage2 libcupsmime1 libcupsppdc1
      libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libegl-mesa0 libegl1-mesa libext2fs2 libfdisk1 libgbm1
      libgjs0g libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libglx-mesa0 libkmod2 libmount1 libnma0 libnss-myhostname libnss-systemd
      libpam-systemd libsmartcols1 libsmbclient libss2 libsystemd0 libtotem0 libudev1 libuuid1 libwayland-client0 libwayland-cursor0
      libwayland-egl1-mesa libwayland-server0 libwbclient0 libxatracker2 linux-firmware mesa-va-drivers mesa-vdpau-drivers mount
      network-manager-gnome python-apt-common python3-apt python3-distupgrade python3-update-manager rfkill samba-libs snapd systemd
      systemd-sysv tar thermald totem totem-common totem-plugins ubuntu-release-upgrader-core ubuntu-release-upgrader-gtk udev update-manager
      update-manager-core update-notifier update-notifier-common util-linux uuid-runtime
    108 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
    Inst bsdutils [1:2.31.1-0.4ubuntu3.2] (1:2.31.1-0.4ubuntu3.3 Ubuntu:18.04/bionic-updates [amd64])
    Conf bsdutils (1:2.31.1-0.4ubuntu3.3 Ubuntu:18.04/bionic-updates [amd64])
    Inst libext2fs2 [1.44.1-1ubuntu1] (1.44.1-1ubuntu1.1 Ubuntu:18.04/bionic-updates [amd64]) [e2fsprogs:amd64 on libext2fs2:amd64] [e2fsprogs:amd64 ]
    Conf libext2fs2 (1.44.1-1ubuntu1.1 Ubuntu:18.04/bionic-updates [amd64]) [e2fsprogs:amd64 ]
    Inst e2fsprogs [1.44.1-1ubuntu1] (1.44.1-1ubuntu1.1 Ubuntu:18.04/bionic-updates [amd64])
    ...
    
  2. use interactive form of Aptitude instead of plain apt/apt-get

    Aptitude

    Note: I have collapsed the Packages to be upgraded section for readability of other sections.

Solution 3:

Im using this

apt list --upgradable | column -t | awk '{print $1"\t"$2"\t"$6}' | column -t | tr -d "]"

groot@debian:~# apt list --upgradable | column -t | awk '{print $1"\t"$2"\t"$6}' | column -t | tr -d "]"

Listing...
e2fslibs/stable                    1.44.5-1+deb10u2                     1.44.5-1+deb10u1
e2fsprogs-l10n/stable              1.44.5-1+deb10u2                     1.44.5-1+deb10u1
e2fsprogs/stable                   1.44.5-1+deb10u2                     1.44.5-1+deb10u1
gir1.2-ibus-1.0/stable             1.5.19-4+deb10u1                     1.5.19-4
libcom-err2/stable                 1.44.5-1+deb10u2                     1.44.5-1+deb10u1
libexpat1/stable                   2.2.6-2+deb10u1                      2.2.6-2
libext2fs2/stable                  1.44.5-1+deb10u2                     1.44.5-1+deb10u1
libibus-1.0-5/stable               1.5.19-4+deb10u1                     1.5.19-4
libibus-1.0-dev/stable             1.5.19-4+deb10u1                     1.5.19-4
libss2/stable                      1.44.5-1+deb10u2                     1.44.5-1+deb10u1
libssl1.1/stable                   1.1.1d-0+deb10u2                     1.1.1c-1
linux-image-4.19.0-6-amd64/stable  4.19.67-2+deb10u1                    4.19.67-2
linux-libc-dev/stable              4.19.67-2+deb10u1                    4.19.67-2
openssh-client/stable              1:7.9p1-10+deb10u1                   1:7.9p1-10
openssh-server/stable              1:7.9p1-10+deb10u1                   1:7.9p1-10
openssh-sftp-server/stable         1:7.9p1-10+deb10u1                   1:7.9p1-10
openssl/stable                     1.1.1d-0+deb10u2                     1.1.1c-1
tzdata/stable-updates              2019c-0+deb10u1                      2019b-0+deb10u1
wpasupplicant/stable               2:2.7+git20190128+0c1e29f-6+deb10u1  2:2.7+git20190128+0c1e29f-6