2

pacman -Syu outputs a list of packages that need be updated. It then prints the total update size (i.e. how much data to download).

My question is: is there a way to get the download size for each packet that needs to be updated? I thought that could be done maybe via expac and some text handlin, but I couldn't figure out how.

I was thinking an output print like:

package1-name X MB
package2-name X MB
...

2 Answers 2

3

Yes there is.

All that's needed is to enable VerbosePkgLists in pacman.conf, which according to the documentation:

Displays name, version and size of target packages formatted as a table for upgrade, sync and remove operations.

This for instance produces

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

core/bash                        5.1.004-1              5.1.008-1                0.01 MiB       1.65 MiB
4
  • This does not work as of 2022-12-16. If you install ONE package our group or meta package , yes it shows the details. If you do like OP asked, pacman -Su, NO, it shows total only Commented Dec 16, 2022 at 14:38
  • 1
    Well, it DOES work , but your terminal needs "unknow width" or in other words, if you terminal is not really really wide , pacman will fall back to not showing the package sizes in detail. A bit weird for debugging Commented Dec 16, 2022 at 15:07
  • @CaptainCrunch: I am the OP -- this is self answered. Yes, you do need a bit of space to show all the details which is understandable. Maybe in the future one may choose what info to show in such setting.
    – edmz
    Commented Dec 18, 2022 at 14:54
  • I had totally missed the warning warning: insufficient columns available for table display above the condensed list...
    – kubi
    Commented Jun 13 at 6:40
1
pacman -Qui | awk '/^Name/{name=$3} /^Installed Size/{print $4$5, name}' | sort -h

from a slightly modified version of this command from the wiki

You must log in to answer this question.

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