#PSA for my #OpenBSD peeps:
I have a simple script called
pkg_size that lets you query the size of a package
and any dependencies that would need to be installed* without installing it.
* (it totals the sizes that
pkg_add -s reports for every mountpoint and converts it to usable SI units, not just bytes)
https://codeberg.org/rldane/scripts/src/branch/main/pkg_size
It has no dependencies outside of base* (I just reworked it to use
/bin/ksh instead of bash).
* (Actual dependencies/external binaries called:
basename,
bc,
grep,
mktemp,
pkg_add,
pkg_info,
rm,
sed,
tee)
Example:
$ pkg_size qemu
quirks-7.147 signed on 2025-10-10T23:15:26Z
qemu-10.0.2:capstone-5.0: ok
qemu-10.0.2:libssh-0.11.3: ok
qemu-10.0.2:dtc-1.7.0: ok
qemu-10.0.2:libiscsi-1.20.0: ok
qemu-10.0.2:qemu-ga-10.0.2: ok
qemu-10.0.2:libslirp-4.7.0: ok
qemu-10.0.2: ok
/dev/sd1a on /: 1946 bytes
/dev/sd1h on /usr/local: 882110457 bytes
qemu 841.24 MiB
Usage:
pkg_size package1 [ package2 [ package3 ... ] ]