Skip to content

Instantly share code, notes, and snippets.

@trvrm
trvrm / packages.py
Last active January 23, 2023 13:39
Check for ubuntu pending updates
# modified from /usr/lib/update-notifier/apt-check
import subprocess
def checkUpgrades():
import apt_pkg
DISTRO = subprocess.check_output(["lsb_release", "-c", "-s"], universal_newlines=True).strip()
def isSecurityUpgrade(ver):