<b>Warning:</b> This page is intended for advanced users only. Most users seeking to upgrade should instead <ahref="/doc/templates/debian/#installing">install a new Debian template</a>. Learn more about the two options <ahref="/doc/templates/debian/#upgrading">here</a>.
This page provides instructions for performing an in-place upgrade of an installed [Debian Template](/doc/templates/debian/).
If you wish to install a new, unmodified Debian template instead of upgrading a template that is already installed in your system, please see the [Debian Template](/doc/templates/debian/) page instead. ([Learn more about the two options.](/doc/templates/debian/#upgrading))
**Note:** The prompt on each line indicates where each command should be entered: `dom0`, `debian-<old>`, or `debian-<new>`, where `<old>` is the Debian version number *from* which you are upgrading, and `<new>` is the Debian version number *to* which you are upgrading. When upgrading from `buster` to `bullseye` please see the [release specific notes](/doc/template/debian/upgrade/#release-specific-notes).
**Note:** The prompt on each line indicates where each command should be entered: `dom0`, `debian-<old>`, or `debian-<new>`, where `<old>` is the Debian version number *from* which you are upgrading, and `<new>` is the Debian version number *to* which you are upgrading.
Please see [Debian's Bullseye upgrade instructions](https://www.debian.org/releases/bullseye/amd64/release-notes/ch-upgrading.en.html). In particular: for APT source lines referencing the security archive, the format has changed slightly along with the release name, going from buster/updates to bullseye-security; see [Section 5.1.2, “Changed security archive layout”](https://www.debian.org/releases/stable/mips64el/release-notes/ch-information.en.html#security-archive).
This means that when upgrading from `buster` to `bullseye` an additional `sed` command is required:
```
[user@dom0 ~]$ qvm-clone debian-10 debian-11
[user@dom0 ~]$ qvm-run -a debian-11 gnome-terminal
[user@debian-<new> ~]$ sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list
[user@debian-<new> ~]$ sudo sed -i 's/debian-security bullseye\/updates/debian-security bullseye-security/g' /etc/apt/sources.list
[user@debian-<new> ~]$ sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list.d/qubes-r4.list
This is due to a new Debian config setting that attempts to update automatically; it should be disabled with `sudo systemctl disable apt-daily.{service,timer}`.
We strongly recommend against using any Debian release that has reached [end-of-life (EOL)](https://wiki.debian.org/DebianReleases#Production_Releases).
* Please note that, if you installed packages from one of the testing repositories, you must make sure that the repository is enabled in `/etc/apt/sources.list.d/qubes-r4.list` before attempting the upgrade.