Last active
October 14, 2025 17:13
-
-
Save ThinGuy/0ced4a8d7e356f30aacabefae311da30 to your computer and use it in GitHub Desktop.
Quickly check what component (main, universe,etc) . Supports simple regex (via 'apt-cache search -n').
This file contains hidden or 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
| pkgcmp() { | |
| for P in $(apt-cache search -n "${@}"|awk -F' - ' '{print $1}');do | |
| [[ -z ${P} ]] && { continue; }; | |
| printf "${P}: $(apt-cache show ${P}|awk '/^Section:/&&!/^$/{if ($2 !~ /\//) print "main";else {gsub(/\/.*/,"",$2);print $2}}')\n"; | |
| done | |
| };export -f pkgcmp |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example: