1

Suppose I don't upgrade my system for a while. Once I finally run pacman -Syu, I'll obviously get lots of packages. In cases like this, the output is completely unacceptable - all packages are written in one line without any kind of alignment, only simple wrapping.

So, can I get pacman to show the packages in columns like ls -C, or at least vertically like ls -1?

So far I've been using pacman -Syu --print-format '%n %v', but this is suboptimal (especially that passing --print-format forces pacman to run in dry-run mode, so I actually need to run pacman -Syu again after examining the packages). Writing a wrapper script, or switching to another frontend, feels like overkill.

  • Why is pacman -Syu --print-format '%n %v' suboptimal ? – don_crissti Nov 15 '15 at 19:29
  • Because of what I've said in the post, + that's a lot of keystrokes to type. Creating an alias for this will need to have different name than pacman to avoid name conflicts, and now your package manager has two entry points: pacman and your_alias. And having multiple entry points for package managers reminds me of debian's aptitude, apt-get, apt-cache and dpkg madness. – rr- Nov 15 '15 at 19:34
3

Rather than making pacman print in columns (or a single column), it is possible to tell pacman to print package in tables (think ls -l). That alone should make the package list itself much more readable.

This behavior can be turned on by uncommenting VerbosePkgLists option under [options] section in /etc/pacman.conf. There is no command line switch for this.

Before:

resolving dependencies...
looking for conflicting packages...

Packages (3) pacman-mirrorlist-20151115-1  pam-1.2.1-3  taglib-1.10-1

Total Download Size:    0.96 MiB
Total Installed Size:   4.65 MiB
Net Upgrade Size:      -0.51 MiB

:: Proceed with installation? [Y/n] 

After:

resolving dependencies...
looking for conflicting packages...

Package (3)             Old Version  New Version  Net Change  Download Size

core/pacman-mirrorlist  20151109-1   20151115-1     0.00 MiB       0.00 MiB
testing/pam             1.2.1-2      1.2.1-3       -0.65 MiB       0.59 MiB
testing/taglib          1.9.1-1      1.10-1         0.13 MiB       0.36 MiB

Total Download Size:    0.96 MiB
Total Installed Size:   4.65 MiB
Net Upgrade Size:      -0.51 MiB

:: Proceed with installation? [Y/n]
  • Ok, they do display vertically (and also show more upgrade info, which is nice) but the display is still confusing because the packages are not displayed sorted by package name, so I still have to read line-by-line each one to see if a package I'm interested will be upgraded or not. – stratosgear Mar 21 '17 at 9:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.