Skip to content

Instantly share code, notes, and snippets.

@aerodomigue
Created August 17, 2025 11:15
Show Gist options
  • Select an option

  • Save aerodomigue/0320ec3dffbc60caeaee8a6fc83cb470 to your computer and use it in GitHub Desktop.

Select an option

Save aerodomigue/0320ec3dffbc60caeaee8a6fc83cb470 to your computer and use it in GitHub Desktop.
Upgrade LXC Debian 12 to 13 (copy/paste solution)
#!/bin/bash
# Update source from bookworm to trixie
sed -i 's/bookworm/trixie/g' /etc/apt/sources.list
apt-get update
# Upgrade to trixie
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" dist-upgrade -y
# Disable services that break in LXC / containers (harmless if not present)
systemctl disable --now systemd-networkd-wait-online.service || true
systemctl disable --now systemd-networkd.service || true
systemctl disable --now ifupdown-wait-online || true
# Install ifupdown2 (better networking stack for LXC/VMs)
apt-get install -y ifupdown2
# Cleanup
apt-get autoremove --purge -y
apt-get clean
reboot
@calvinthefreak
Copy link

Thanks budy. Quite nice to have this, could've written that my self, but heh, lazyness is the key :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment