1

I'd like to check which packages were installed from non-free component on my server, following the recent announcement by the Debian team https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.html#non-free-split

I briefly looked into man dpkg, man apt-cache but couldn't find a quick answer to my question. Could anyone suggest a command or a one-liner?

(I didn't even know the main/contrib/non-free field is called a "component": https://wiki.debian.org/SourcesList#Component )

nodakai
  • 311
  • 3
  • 8

1 Answers1

1
$ dpkg-query --show -f '${Package} ${Version} ${Section}\n' | grep -E ' non-free/\w+$'
amd64-microcode 3.20220411.1 non-free/admin
bluez-firmware 1.2-8 non-free/kernel
firmware-amd-graphics 20221214-3 non-free/kernel
firmware-linux 20221214-3 non-free/metapackages
...snip...

I'm not sure if this is documented anywhere, apparently the Section field is qualified by a "component", so by printing it out with ${Section} we can filter entries by component.

https://manpages.debian.org/bullseye/dpkg/dpkg-query.1.en.html#f

This option is used to specify the format of the output --show will produce ...snip...

Actually, all other fields found in the status file (i.e. user defined fields) can be requested, too. They will be printed as-is, ...snip...

nodakai
  • 311
  • 3
  • 8