---
title: How to Upgrade from Debian 11 to Debian 12
url: https://docs.vultr.com/how-to-upgrade-from-debian-11-to-debian-12
description: Learn how to safely upgrade your system from Debian 11 Bullseye to Debian 12 Bookworm with our step-by-step guide covering preparation, execution, and troubleshooting.
publish_date: 2024-09-20T16:19:56.046951Z
last_updated: 2026-04-15T00:00:00.077250Z
author: Hitesh Jethva
header_image: https://docs.vultr.com/public/doc-assets/1942/301d011f-76d7-4079-be42-b9c8fa14d974.png
---

> Index of every Vultr Docs page in markdown: https://docs.vultr.com/llms.txt

## Introduction

Upgrading your Debian operating system ensures your server runs with the latest security patches, performance enhancements, and software updates. Debian 12 offers up-to-date system driver packages and kernel versions with better stability and performance.

This article explains how to upgrade from Debian 11 to Debian 12 and migrate all existing packages with minimal downtime.

## Prerequisites

Before you begin:

* Deploy a [Debian 11 instance on Vultr](https://vultr.com/servers/debian) to test the upgrade process.
* Access the instance using SSH as a non-root user with sudo privileges.
* Verify that your instance has at least `2GB` of available space.

    ```console
    $ df -h
    ```

    Your output should be similar to the one below:

    ```
    Filesystem      Size  Used Avail Use% Mounted on
    udev            462M     0  462M   0% /dev
    tmpfs            96M  1.9M   94M   2% /run
    /dev/vda2        23G  5.1G   17G  23% /
    tmpfs           480M     0  480M   0% /dev/shm
    tmpfs           5.0M     0  5.0M   0% /run/lock
    /dev/vda1       511M   12M  500M   3% /boot/efi
    tmpfs            96M     0   96M   0% /run/user/0
    ```

## Create a Full Server Backup

Upgrading to Debian 12 can corrupt existing server packages that may be incompatible with the new operating system. A snapshot is a point-in-time copy of your instance state and file system used for versioning and backup purposes. Follow the steps below to take a new snapshot and recover your instance in case the upgrade process fails.

1. Open the [Vultr Console](https://console.vultr.com/).
1. Click **Products** and select **Compute** on the main navigation menu.

    ![Deploy a new instance](https://docs.vultr.com/public/doc-assets/1942/21c30931-9b9c-42ed-812a-d99335500a3b.png)

1. Select your target Debian 11 instance to open its management page.
1. Navigate to the **Snapshots** tab.

    ![Click Snapshots](https://docs.vultr.com/public/doc-assets/1942/64a45325-fa82-4949-94d7-736cf5248ed3.png)

1. Enter a new snapshot label in the **Label** field and click **Take Snapshot**.

    ![Enter Snapshot Label](https://docs.vultr.com/public/doc-assets/1942/05b7aaab-4190-44e7-9657-945315081f10.png)

1. Monitor the snapshot's progress and verify the status changes from **Pending** to **Available**.

    ![Monitor the Snapshot progress](https://docs.vultr.com/public/doc-assets/1942/b9a81ea9-a5cd-418d-bbe9-2f7442e06863.png)

    You have created a new snapshot you can use to recover your original instance state in case of any upgrade failures. Use backup tools such as `rsync` or `tar` on a physical server to back up your instance data before starting the upgrade process.

## Test the Compatibility of Installed Applications

Some applications may be incompatible with Debian 12. Follow the steps below to verify the installed applications on your server and ensure compatibility with Debian 12.

* **View the official application documentation sources:** Visit each application's official documentation or releases page to verify it's compatible with Debian 12.
* **Test in a sandbox environment**: Replicate your existing environment on Debian 12 to identify any runtime or configuration issues.
* **Verify the installed packages**: Run the following command to view all installed applications and software packages on your server and export the list to a single `.txt` file.

    ```console
    $ sudo dpkg --get-selections > installed-packages.txt
    ```

    * View the file contents to verify the installed packages.

        ```console
        $ cat installed-packages.txt
        ```

## Pre-upgrade Preparation

Server preparation enables you to upgrade all existing packages for a smooth and successful upgrade. Follow the steps below to update your server packages and prepare for the system upgrade.

1. Update the server's package information index.

    ```console
    $ sudo apt update -y
    ```

1. Upgrade all installed packages to the latest versions.

    ```console
    $ sudo apt upgrade -y
    ```

1. Perform a full upgrade to resolve potential dependency issues and install or remove specific packages.

    ```console
    $ sudo apt full-upgrade -y
    ```

1. Remove any orphaned dependency packages to prevent potential conflicts during the upgrade process.

    ```console
    $ sudo apt autoremove -y
    ```

1. Remove cached packages.

    ```console
    $ sudo apt clean
    ```

## Upgrade from Debian 11 to Debian 12

Upgrading from Debian 11 to Debian 12 may take between `30` to `60` minutes depending on the number of packages on your server. Follow the steps below to upgrade from Debian 11 to Debian 12.

1. View your server's distribution version and verify that it's Debian 11 (`bullseye`).

    ```console
    $ lsb_release -a
    ```

    Output:

    ```
    Distributor ID: Debian
    Description:    Debian GNU/Linux 11 (bullseye)
    Release:        11
    Codename:       bullseye
    ```

1. Update the `/etc/apt/sources.list` file and any files within `/etc/apt/sources.list.d/` directory from `bullseye` (Debian 11) to `bookworm` (Debian 12).

    ```console
    $ sudo sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list && sudo sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list.d/*
    ```

1. Update the server's package information index.

    ```console
    $ sudo apt update
    ```

1. Upgrade the server to Debian 12.

    ```console
    $ sudo apt upgrade
    ```

    Press :key_space: to browse the `apt-listchanges: News` options and press :key_y: to close the pager. When prompted, reply to each of the following prompts:

    * **Character set to support**: Press :key_enter: to use the default keyboard layout.

        ![Console setup prompt](https://docs.vultr.com/public/doc-assets/1942/184ee940-a6ad-43f3-ac90-d2f10631cf46.png)

    * **Restart services during package upgrades without asking?**: Select `Yes` and press :key_enter: to continue with the upgrade process.

        ![Restart service during package upgrades](https://docs.vultr.com/public/doc-assets/1942/453e3ef0-6244-4661-ae12-27a8ae8de130.png)

    * **What do you want to do about modified configuration file ssh_config?**: Select `install the package maintainer's version` and press :key_tab: to select **OK** and press :key_enter:.

        ![What do you want to do about modified configuration file ssh_config](https://docs.vultr.com/public/doc-assets/1942/05fb1421-d431-4ed1-b794-b2e84a9219f0.png)

    * **What do you want to do about modified configuration file grub?**: Select `install the package maintainer's version`, select **OK**, and press :key_enter:.

        ![What do you want to do about modified configuration file grub](https://docs.vultr.com/public/doc-assets/1942/d73496c3-5d76-4ef8-bd0f-ddaebe3d6a1f.png)

    * `Configuration file '/etc/ntpsec/ntp.conf`: Enter :key_y: and press :key_enter: to install the NTP package maintainer's version.

        ```
        Configuration file '/etc/ntpsec/ntp.conf'
        ==> File on system created by you or by a script.
        ==> File also in package provided by package maintainer.
          What would you like to do about it ?  Your options are:
           Y or I : install the package maintainer's version
           N or O : keep your currently-installed version
           D : show the differences between the versions
           Z : start a shell to examine the situation
        The default action is to keep your current version.
        *** ntp.conf (Y/I/N/O/D/Z) [default=N] ? Y
        ```

1. Perform a full upgrade of all packages on the server.

    ```console
    $ sudo apt full-upgrade -y
    ```

    The above command upgrades all installed packages to their latest versions, installs new packages, and removes any conflicting or obsolete packages.

1. Remove any unnecessary packages and clear the package cache.

    ```console
    $ sudo apt autoremove -y && sudo apt clean -y
    ```

1. View your server's distribution version and verify you have upgraded to Debian 12 (`bookworm`).

    ```console
    $ lsb_release -a
    ```

    Output:

    ```
    Distributor ID: Debian
    Description:    Debian GNU/Linux 12 (bookworm)
    Release:        12
    Codename:       bookworm
    ```

1. Restart the server to apply all changes.

    ```console
    $ sudo reboot
    ```

## Test the Upgraded Debian 12 Server

Follow the steps below to test the upgraded Debian server and verify that all packages run correctly with the latest versions.

1. View your server distribution version and verify that it's Debian 12 (`bookworm`).

    ```console
    $ lsb_release -a
    ```

    Output:

    ```
    Distributor ID: Debian
    Description:    Debian GNU/Linux 12 (bookworm)
    Release:        12
    Codename:       bookworm
    ```

    Debian 12 (`bookworm`) is the active operating system version on your server based on the above output.

1. View the updated Linux kernel version.

    ```console
    $ uname -r
    ```

    Output:

    ```
    5.10.0-31-amd64
    ```

1. Test access to a common domain such as `google.com` to verify network connectivity.

    ```console
    $ ping -c 4 google.com
    ```

    Output:

    ```
    PING google.com(2c0f:fb50:4002:81d::200e (2c0f:fb50:4002:81d::200e)) 56 data bytes
    64 bytes from 2c0f:fb50:4002:81d::200e (2c0f:fb50:4002:81d::200e): icmp_seq=1 ttl=59 time=0.745 ms
    64 bytes from 2c0f:fb50:4002:81d::200e (2c0f:fb50:4002:81d::200e): icmp_seq=2 ttl=59 time=0.758 ms
    64 bytes from 2c0f:fb50:4002:81d::200e (2c0f:fb50:4002:81d::200e): icmp_seq=3 ttl=59 time=0.798 ms
    64 bytes from 2c0f:fb50:4002:81d::200e (2c0f:fb50:4002:81d::200e): icmp_seq=4 ttl=59 time=0.775 ms

    --- google.com ping statistics ---
    4 packets transmitted, 4 received, 0% packet loss, time 3004ms
    rtt min/avg/max/mdev = 0.745/0.769/0.798/0.019 ms
    ```

## Conclusion

You have upgraded your server from Debian 11 to Debian 12. Upgrading your operating system version ensures that your server receives the latest security patches and updates to improve the system's performance. For more information, visit the [Debian upgrade documentation](https://www.debian.org/releases/stable/arm64/release-notes/ch-upgrading.en.html).
