#!/bin/bash # h-plan.sh — READ-ONLY on the system's own lists (apt-get update refreshes them, as pve-daily-update does daily): # pick the Debian-origin upgrades, excluding the slow-lane names, and simulate installing exactly those. export LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get update -q >/dev/null 2>&1; echo update_rc=$? apt-get -s dist-upgrade > /root/h-sim-all.txt 2>&1 grep '^Inst ' /root/h-sim-all.txt | grep -v 'Proxmox' | awk '{print $2}' | grep -vE '^(proxmox-|pve-|lxc-pve|qemu-server|libpve|librados|libproxmox|libpve)' > /root/h-debian-pkgs.txt echo "debian candidates: $(wc -l < /root/h-debian-pkgs.txt)" apt-get -s install --only-upgrade $(cat /root/h-debian-pkgs.txt) > /root/h-sim-fast.txt 2>&1 echo "sim rc=$?" grep -E "^[0-9]+ upgraded|Need to get|After this" /root/h-sim-fast.txt echo "--- Proxmox-origin packages the fast-lane plan would pull in (must be none):" grep '^Inst ' /root/h-sim-fast.txt | grep -c 'Proxmox' grep '^Inst ' /root/h-sim-fast.txt | grep 'Proxmox' | head echo "--- new packages in the plan:"; grep '^Inst ' /root/h-sim-fast.txt | grep -v '^Inst [^ ]* \[' | awk '{print $2}' echo "--- kept back / not upgraded:"; grep -E "not upgraded|kept back" /root/h-sim-fast.txt echo "--- big restarters in the plan:"; grep '^Inst ' /root/h-sim-fast.txt | awk '{print $2}' | grep -xE 'libc6|systemd|openssh-server|openssh-client|dbus|udev|libsystemd0|openssl|libssl3t64|zfsutils-linux|postfix|amd64-microcode|libpam.*|login|util-linux|mount' | tr '\n' ' '; echo