Close Menu
Rob FaulsRob Fauls
    What's Hot

    Odoo 17- Change default email address

    March 10, 2024

    Odoo 17- Automated Install on Debian 12

    December 26, 2023

    Odoo 17- Manual Install on Debian 10/Debian 11/Debian 12

    November 8, 2023
    Facebook X (Twitter) LinkedIn
    • Home
    • VMware
      • Storage
    • Odoo
    • Linux
    • About
      • About Me
      • Privacy Policy
    Rob FaulsRob Fauls
    Home » Upgrade Debian 11 to Debian 12
    Linux

    Upgrade Debian 11 to Debian 12

    Rob FaulsBy Rob FaulsAugust 17, 2023Updated:September 26, 2023No Comments
    Facebook Twitter LinkedIn Email Reddit Telegram
    Share
    Facebook Twitter LinkedIn Pinterest Email

    The process of upgrading from Debian 11 to Debian 12 is fairly straightforward for those that have been doing it for a while, but for those that are not familiar, it can be a daunting task. In this article, I’ll present two different options for upgrading: Manual and Automated. The automated (scripted) process is the same as the manual process, so please work the manual process in your environment before using the script. As always, please be sure you’ve got a proper backup of your machine before starting the process!

    1: Update system

    Before doing the upgrade, you must ensure your system is running the current latest packages within your current version.

    				
    					sudo apt update && sudo apt upgrade && sudo apt full-upgrade
    				
    			

    2: Make a backup of your current /etc/apt/sources.list file

    In case anything goes wrong while updating the sources.list file, it’s always good to have a backup.

    				
    					cp /etc/apt/sources.list /etc/apt/sources.list.orig
    				
    			

    3: Modify /etc/apt/sources.list

    You may choose your favorite text editor, but in this example, I’ll use nano for the process.

    				
    					sudo nano /etc/apt/sources.list
    				
    			

    Original file (may vary):

    				
    					deb http://deb.debian.org/debian bullseye main
    deb-src http://deb.debian.org/debian bullseye main
    deb http://security.debian.org/debian-security bullseye-security main
    deb-src http://security.debian.org/debian-security bullseye-security main
    deb http://deb.debian.org/debian bullseye-updates main
    deb-src http://deb.debian.org/debian bullseye-updates main
    				
    			

    Modified file:

    				
    					deb http://deb.debian.org/debian bookworm main
    deb-src http://deb.debian.org/debian bookworm main
    deb http://security.debian.org/debian-security bookworm-security main
    deb-src http://security.debian.org/debian-security bookworm-security main
    deb http://deb.debian.org/debian bookworm-updates main
    deb-src http://deb.debian.org/debian bookworm-updates main
    				
    			

    4: Clean and update package lists

    Make sure that aptitude has the right packages/versions, without any of the old “stuff”.

     

    				
    					sudo apt clean
    sudo apt update
    				
    			

    5: Perform the upgrade

    				
    					sudo apt upgrade
    sudo apt full-upgrade
    				
    			

    6: Remove old packages

    This will remove the old/unrequired packages. Please be sure to review this list to ensure you don’t accidentally delete something you need.

    				
    					sudo apt autoremove
    				
    			

    Automated process:

    If you’ve gotten this far, you probably already know what you’re doing and are just looking for a shortcut. I’ve created the following script to make things easier/quicker. I’ve tested this on my installations, but please verify that the sed commands will work in your environment before running them. In the event that there is a problem, the script makes a backup of your sources.list file, which you can restore.

    				
    					curl https://code.flatironnetworks.com/RobFauls-Com/website-scripts/raw/branch/main/Linux/Debian/Upgrade/Upgrade-Debian11toDebian12.sh --output debian_upgrade.sh && sh debian_upgrade.sh
    				
    			
    Debian 11 Debian 12 Featured Upgrade
    Previous ArticleBenchmark persistent disk performance on Linux
    Next Article ChatGPT On Why It Is “Bad”

    Related Posts

    Odoo 17- Automated Install on Debian 12

    December 26, 2023

    Odoo 17- Manual Install on Debian 10/Debian 11/Debian 12

    November 8, 2023

    Migrate from Github to Gitea

    September 21, 2023

    Benchmark persistent disk performance on Linux

    August 17, 2023
    Leave A Reply Cancel Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Editors Picks
    Latest Posts

    Odoo 17- Change default email address

    March 10, 2024

    Odoo 17- Automated Install on Debian 12

    December 26, 2023

    Odoo 17- Manual Install on Debian 10/Debian 11/Debian 12

    November 8, 2023

    Subscribe to Updates

    Get the latest content from Rob.

    I've worked in IT for over 20 years, servicing Government, Healthcare, and Private Sector customers. This is a relatively new adventure into blogging, mostly out of a realization that I need to organize some of my notes on various subjects. Hopefully the articles posted will help others along the way.

    You can connect with me here:

    LinkedIn X (Twitter) Facebook

    Subscribe to Updates

    Keep up to date with new articles posted about 'stuff and things'.

    © 2025 Rob Fauls. Hosted by Flatiron Networks.
    • Home

    Type above and press Enter to search. Press Esc to cancel.