> ## Documentation Index
> Fetch the complete documentation index at: https://help.onetsolutions.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Upgrade Debian 11 to Debian 12

> Step-by-step guide to upgrade from Debian 11 (Bullseye) to Debian 12 (Bookworm)

This guide walks you through upgrading your Debian 11 (Bullseye) system to Debian 12 (Bookworm).

<Warning>
  **Before you begin:**

  * Backup all important data
  * Create a [snapshot](/vps/snapshot) of your VPS
  * Ensure you have console access in case of issues
</Warning>

## Pre-Upgrade Preparation

<Steps>
  <Step title="Update Debian 11">
    Ensure your current system is fully updated:

    ```bash theme={null}
    sudo apt update && sudo apt dist-upgrade -y
    ```
  </Step>

  <Step title="Disable third-party repositories">
    Comment out or remove third-party repository entries in `/etc/apt/sources.list` and `/etc/apt/sources.list.d/`.
  </Step>
</Steps>

## Upgrade Process

<Steps>
  <Step title="Update sources list">
    Replace `bullseye` with `bookworm`:

    ```bash theme={null}
    sudo sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list
    ```
  </Step>

  <Step title="Update package lists">
    ```bash theme={null}
    sudo apt update
    ```
  </Step>

  <Step title="Upgrade packages">
    ```bash theme={null}
    sudo apt upgrade -y
    ```
  </Step>

  <Step title="Perform distribution upgrade">
    ```bash theme={null}
    sudo apt dist-upgrade -y
    ```

    Follow any on-screen prompts to resolve conflicts.
  </Step>

  <Step title="Reboot">
    ```bash theme={null}
    sudo reboot
    ```
  </Step>

  <Step title="Verify upgrade">
    After rebooting, check the new version:

    ```bash theme={null}
    lsb_release -a
    ```
  </Step>
</Steps>

## Post-Upgrade Steps

<Steps>
  <Step title="Re-enable third-party repositories">
    Update third-party repositories to their Debian 12 versions if available.
  </Step>

  <Step title="Clean up">
    Remove obsolete packages:

    ```bash theme={null}
    sudo apt autoremove
    sudo apt clean
    ```
  </Step>

  <Step title="Verify services">
    Check that all essential services are running correctly.
  </Step>
</Steps>

<Tip>
  If you encounter issues during upgrade, use the [KVM Console](/vps/kvm-console) to access your server and troubleshoot.
</Tip>
