Determining which installed packages are from universe or multiverse

I was interested in trying to determine how many packages were installed from universe on the servers I manage. Luckily I came across a helpful discussion titled list installed Universe packages which suggested this command:

  • comm -12 <(apt-cache dumpavail | grep-dctrl -nsPackage -FSection universe/ |sort) <(dpkg --get-selections | awk '$2 == "install" { print $1 }' |sort)

To get the command to work I had to install the package dctrl-tools (for the grep-dctrl command):

  • sudo apt-get install dctrl-tools

After that it worked pretty well and can easily be adapted to search for other sections. It turns out that my servers use many packages from universe but none from restricted or multiverse, which is nice.

Trackback URL for this post:

http://hightechsorcery.com/trackback/105
Creative Commons License Except where otherwise noted, content on this site is licensed under a Creative Commons by-nc-sa 3.0 License