Created
September 1, 2022 06:47
-
-
Save zerwes/9df84303ae6b3a5faaf5fc4275e955d2 to your computer and use it in GitHub Desktop.
find packages not distributed by the current distro - for example after doing what you should never do: a dist upgrade from ubuntu to debian :-)
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 | |
# apt install python3-apt | |
import apt | |
cache = apt.Cache() | |
for pkg in cache: | |
if cache[pkg.name].is_installed: | |
continue | |
if cache[pkg.name].candidate: | |
continue | |
print(pkg.name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment