Skip to content

Instantly share code, notes, and snippets.

@schorschii
schorschii / find_downgradable_packages.py
Last active September 16, 2025 15:28
This is the apt downgrade logic of the mintupgrade GUI tool - useful if you want to upgrade many computers via CLI. After changing apt's sources.list and executing `apt dist-upgrade`, you need to downgrade some packages, e.g. base-files to show the correct Mint version in system info dialog (/etc/lsb-release).
#!/usr/bin/python3
import apt
import apt_pkg
import aptsources.sourceslist
import subprocess
# Returns a tuple containing two lists
# The first list is a list of orphaned packages (packages which have no origin)
# The second list is a list of packages which version is not the official version (this does not
@schorschii
schorschii / update-keydb.sh
Created March 5, 2026 16:57
Automatically keep your KEYDB.cfg up-to-date for Bluray playback on Linux.
#!/bin/bash
URL="http://fvonline-db.bplaced.net/fv_download.php?lang=eng"
FILE_ARCHIVE="keydb.cfg"
FILE_TARGET="KEYDB.cfg"
mkdir -p ~/.config/aacs
cd ~/.config/aacs
wget -O "$FILE_ARCHIVE.part" "$URL"