Last active
May 18, 2024 07:29
-
-
Save jimdigriz/dc506a1bd52b7a7711bfc9a5bc34346f to your computer and use it in GitHub Desktop.
List installed packages not part of Debian 'stable'
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
#!/usr/bin/env python3 | |
import apt | |
ORIGINS = frozenset(['stable', 'stable-security']) | |
CACHE = apt.Cache() | |
for pkg in filter(lambda p: p.installed, CACHE): | |
origins = pkg.versions[pkg.candidate].origins | |
if not any(( o for o in origins if o.archive in ORIGINS )): | |
print(pkg, origins[0].archive, origins[0].site) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment