Last active
November 16, 2017 21:27
-
-
Save metaquanta/6b249be06e80170fc3a32725aef7b429 to your computer and use it in GitHub Desktop.
List packages that don't belong in your distro.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PACKAGE_LIST="dpkg-query -W -f='${binary:Package}\n'" # List all debs | |
#PACKAGE_LIST=apt-mark showmanual # List only requested/manually installed debs | |
# Unknown origin debs get 100. | |
#PRIORITY=100 | |
# I have some preferences to set some repos to other priorities in (100-200) | |
PRIORITY="1.." | |
$PACKAGE_LIST | \ | |
xargs apt-cache policy | \ | |
grep -B 4 " \*\*\*.*${PRIORITY}$" | \ | |
grep -v "^ " | \ | |
grep -v -- '^--' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment