3

I take interest in seeing which packages are being upgraded when I run apt-get upgrade and it would be much easier on the eyes if it there were a way to simply list everything line by line instead of all clumped together.

Right after the message "The following packages will be upgraded:" it usually looks something like this:

apport apport-gtk bind9-dnsutils bind9-host bind9-libs distro-info-data djvulibre-bin dnsutils firefox firefox-locale-en google-chrome

Does anyone know of some switch I can add to get them to appear like this instead?

apport
apport-gtk
bind9-dnsutils
bind9-host
bind9-libs
distro-info-data
djvulibre-bin
dnsutils
firefox
firefox-locale-en
google-chrome

This is obviously not a major issue or anything urgent, it's just something over the years which has had me wondering if there was a better way to separate and quickly scan the list of packages.

I'm just curious if this is possible to make this section much easier to read. Every other line of what's processing I can quickly scan vertically only to get hung up trying to take the time to mentally separate each package by spaces.

5
  • Try: apt list --upgradable - works on stretch and buster. May 19, 2021 at 6:50
  • @Cinaed that doesn’t provide the same information; it lists all the potentially upgradable packages, whereas apt upgrade shows the packages that will be upgraded (which is often only a subset of the former). May 19, 2021 at 8:48
  • @StephenKitt - that's what you get when you run apt upgrade - all the packages that need to be upgraded. But you have to run apt update first. In fact, the system informs you to use apt list --upgradable to see the list. May 19, 2021 at 8:54
  • @Cinaed no, it’s not. apt list --upgradable lists all the packages for which a newer version is a candidate. apt upgrade lists all the packages which will be upgraded in that apt upgrade run, after dependency resolution. May 19, 2021 at 9:03
  • @Cinaed on the system I’m writing this from, apt list --upgradable lists 89 packages, but apt upgrade reduces that to 43 because 46 packages aren’t actually upgradable given dependency constraints. May 19, 2021 at 9:04

1 Answer 1

3

There’s no way to show exactly what you want, short of post-processing apt’s output, but if you ask apt to show version details for the upgraded packages, it will show one package per line:

$ sudo apt upgrade -V
...
The following packages will be upgraded:
   ansilove (4.0.4-1 => 4.1.4-1)
   binutils-djgpp (2.34-3+1.4 => 2.35.1+dfsg-1)
   binutils-mingw-w64 (2.31.1-16+8.3.1 => 2.35-2+8.11)
   bochsbios (2.6.11+dfsg-3 => 2.6.11+dfsg-4)
   drmips (2.0.1-2 => 2.0.1-2.1)
   frotz (2.52-0.1 => 2.53+dfsg-1)
...

You can enable this permanently by setting the APT::Get::Show-Versions option to true, for example in /etc/apt/apt.conf:

APT::Get::Show-Versions "true";

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .