Skip to content

Instantly share code, notes, and snippets.

@relthyg
Last active December 9, 2015 17:25
Show Gist options
  • Save relthyg/702baa8ce6ed8bd27533 to your computer and use it in GitHub Desktop.
Save relthyg/702baa8ce6ed8bd27533 to your computer and use it in GitHub Desktop.
List all packages with priorities "required", "important" and "standard"
#!/bin/bash
priorities=(required important standard)
for priority in "${priorities[@]}"
do
dpkg-query -W --showformat='${Package}\t${Priority}\n' | grep "$priority$" | sed "s/\t$priority//g"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment