Created
August 17, 2025 11:15
-
-
Save aerodomigue/0320ec3dffbc60caeaee8a6fc83cb470 to your computer and use it in GitHub Desktop.
Upgrade LXC Debian 12 to 13 (copy/paste solution)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks budy. Quite nice to have this, could've written that my self, but heh, lazyness is the key :D