Skip to content

Instantly share code, notes, and snippets.

@relthyg
Created May 14, 2019 06:28
Show Gist options
  • Save relthyg/6718bd9e62f707f3b3a7d937733ecaba to your computer and use it in GitHub Desktop.
Save relthyg/6718bd9e62f707f3b3a7d937733ecaba to your computer and use it in GitHub Desktop.
List packages installed from non-Debian sources

aptitude search "?narrow(?installed,?not(?origin(Debian)))" | sed "s/^i\sA*\s//" | cut -d " " -f 1 | while read package; do echo -n "$package "; apt-cache policy $package | awk "/\*/{getline; print}" | sed "s/ *[0-9]* //" | cut -d " " -f 1; done | column -t

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment