Skip to content

Instantly share code, notes, and snippets.

@zerwes
Created September 1, 2022 06:47
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
find packages not distributed by the current distro - for example after doing what you should never do: a dist upgrade from ubuntu to debian :-)
#! /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