2

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.

2
  • Why is pacman -Syu --print-format '%n %v' suboptimal ? Nov 15, 2015 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, 2015 at 19:34

1 Answer 1

5

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]
1
  • 1
    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. Mar 21, 2017 at 9:51

You must log in to answer this question.

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