Apt-get show one package per line

tl;dr

Use -V.

sudo apt-get -V upgrade

The story

As a part of my transition from rpm-based distros (Fedora and CentOS) to dpkg-based ones (Devuan), one of my pet peeves is the output of the package manager. Apt-get itself is actually quite decent. My biggest problem with it is the wall of text upon upgrading:

$ sudo apt-get dist-upgrade
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:
  clearlooks-phenix-darkpurpy-theme darkpurpy-icon-theme eject fp-compiler-3.0.4 fp-docs-3.0.4 fp-ide-3.0.4
  fp-units-base-3.0.4 fp-units-db-3.0.4 fp-units-fcl-3.0.4 fp-units-fv-3.0.4 fp-units-gfx-3.0.4 fp-units-math-3.0.4
  fp-units-misc-3.0.4 fp-units-multimedia-3.0.4 fp-units-net-3.0.4 fp-units-rtl-3.0.4 fp-utils-3.0.4
  fpc-source-3.0.4 g++-6 g++-8 gdisk gir1.2-appindicator-0.1 gnome-icon-theme-extras gnome-mime-data guile-2.0-libs
  irqbalance jellyfin-ffmpeg liba52-0.7.4-dev libappindicator1 libart-2.0-2 libass5 libatasmart4 libavformat57
  libavresample3 libbind9-140 libbluray1 libbonobo2-0 libbonobo2-common libbonoboui2-0 libbonoboui2-common
  libboost-atomic1.62.0 libboost-chrono1.62.0 libboost-date-time1.62.0 libboost-serialization1.62.0
  libboost-system1.62.0 libboost-thread1.62.0 libcaca-dev libcdt5 libcgraph6 libck-connector0 libcrystalhd3:i386
  libcupsfilters1 libcupsimage2 libdca-dev libdevel-globaldestruction-perl libdns162 libdouble-conversion1
  libdts-dev libdvdread4 libebook-contacts-1.2-2 libecal-1.2-19 libedataserver-1.2-23 libegl1-mesa libevent-2.0-5
  libevent-2.1-6 libevent-core-2.1-6 libevent-extra-2.1-6 libevent-openssl-2.1-6 libevent-pthreads-2.1-6 libexo-1-0
  libflac-dev libfluidsynth1 libforms-dev libforms2 libgcr-3-common libgd-dev libgit2-27 libgles2-mesa libglew2.0
  libgnome-2-0 libgnome-desktop-3-17 libgnome-keyring-common libgnome-keyring0 libgnome2-common libgnomecanvas2-0
  libgnomecanvas2-common libgnomeui-0 libgnomeui-common libgnomevfs2-0 libgnomevfs2-common libgnomevfs2-extra
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  libpcre2-posix0
The following NEW packages will be installed:
  glib-networking:i386 gstreamer1.0-plugins-good:i386 gstreamer1.0-x:i386 libaa1:i386 libavc1394-0:i386
  libbrotli1:i386 libbz2-1.0:i386 libcaca0:i386 libcairo-gobject2:i386 libcrypt1 libcrypt1:i386 libcrypt1-dev
  libdv4:i386 libfluidsynth2 libgudev-1.0-0:i386 libiec61883-0:i386 libisl22 libjim0.79 libncursesw6:i386
  libpcre2-posix2 libprocps7 libproxy1v5:i386 libpsl5:i386 libraw1394-11:i386 libshout3:i386 libslang2:i386
The following packages have been kept back:
  elogind libblkid1:i386 libelogind0 libmount1:i386 libpam-elogind libuuid1:i386
The following packages will be upgraded:
  base-passwd cpp-8 cpp-9 g++-8 g++-9 galera-3 gcc-8 gcc-8-base gcc-8-base:i386 gcc-9 gcc-9-base gcc-9-base:i386 git
  git-man gstreamer1.0-plugins-bad i965-va-driver i965-va-driver:i386 lib32gcc1 lib32stdc++6 libasan5 libatomic1
  libatomic1:i386 libc-dev-bin libc6 libc6:i386 libc6-dbg libc6-dev libc6-i386 libcc1-0 libebml4v5 libgcc-8-dev
  libgcc-9-dev libgcc1 libgcc1:i386 libgomp1 libgomp1:i386 libgstreamer-plugins-bad1.0-0 libitm1 liblsan0 libmpx2
  libobjc-8-dev libobjc4 libpci3 libpcre2-16-0 libpcre2-32-0 libpcre2-8-0 libpcre2-8-0:i386 libpcre2-dev libpst4
  libquadmath0 libsdl-mixer1.2 libsdl-mixer1.2-dev libsmbclient libssh-gcrypt-4 libstd-rust-dev libstdc++-8-dev
79 upgraded, 35 newly installed, 1 to remove and 6 not upgraded.
Need to get 401 MB of archives.
After this operation, 358 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.

The wall of text for each section (no longer required, REMOVED, NEW, upgraded) is hard to parse.

The helpful folks over at the Devuan forum answered my plea for help. The answer is so simple I was very embarrassed I hadn’t thought of it. RTFM, indeed.

$ sudo apt-get -V dist-upgrade
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:
   clearlooks-phenix-darkpurpy-theme (7.0.2-1+devuan2.0)
   darkpurpy-icon-theme (1.0)
   eject (2.1.5+deb1+cvs20081104-14+b1)
   fp-compiler-3.0.4 (3.0.4+dfsg-23)
   fp-docs-3.0.4 (3.0.4+dfsg-23)
   fp-ide-3.0.4 (3.0.4+dfsg-23)
   fp-units-base-3.0.4 (3.0.4+dfsg-23)
   fp-units-db-3.0.4 (3.0.4+dfsg-23)
   fp-units-fcl-3.0.4 (3.0.4+dfsg-23)
   fp-units-fv-3.0.4 (3.0.4+dfsg-23)
[...truncated...]
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
   libpcre2-posix0 (10.34-1)
The following NEW packages will be installed:
   glib-networking:i386 (2.62.1-1)
   gstreamer1.0-plugins-good:i386 (1.16.2-2)
   gstreamer1.0-x:i386 (1.16.2-2)
   libaa1:i386 (1.4p5-46+b1)
   libavc1394-0:i386 (0.5.4-5)
   libbrotli1:i386 (1.0.7-5+b1)
   libbz2-1.0:i386 (1.0.8-2)
[...truncated...]
The following packages have been kept back:
   elogind (239.3+20190131-1 => 241.3-3)
   libblkid1:i386 (2.32.1-0.1+devuan2.1 => 2.33.1-0.1+devuan1)
   libelogind0 (239.3+20190131-1 => 241.3-3)
   libmount1:i386 (2.32.1-0.1+devuan2.1 => 2.33.1-0.1+devuan1)
   libpam-elogind (239.3+20190131-1 => 241.3-3)
   libuuid1:i386 (2.32.1-0.1+devuan2.1 => 2.33.1-0.1+devuan1)
[...truncated...]
The following packages will be upgraded:
   base-passwd (3.5.46 => 3.5.47)
   cpp-8 (8.3.0-25 => 8.3.0-26)
   cpp-9 (9.2.1-20 => 9.2.1-21)
   g++-8 (8.3.0-25 => 8.3.0-26)
   g++-9 (9.2.1-20 => 9.2.1-21)
   galera-3 (25.3.28-1 => 25.3.28-2)
[...truncated...]
79 upgraded, 35 newly installed, 1 to remove and 6 not upgraded.
Need to get 401 MB of archives.
After this operation, 358 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.

Tada.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.