How to upgrade from Debian 11 'Bullseye' to Debian 12 'Bookworm'
The latest Debian 12 release is finally available, providing many new options for the end user. Debian is known for its stability and diversity.
If you are already using Debian 11 "Bullseye", you can directly upgrade to Debian 12 "Bookworm" from the terminal. Here's how to do it.
Upgrade from Debian 11 to Debian 12 via CLI
You can use your existing Debian 11 installation to upgrade to the latest version. Follow the steps below to get started:
Step 1: Update existing packages
If you've been using Debian for a while, you probably already know the update/upgrade commands. Although there is a difference between update and upgrade commands, you can group them together in one command to update software packages easily:
sudo apt update && sudo apt upgrade -y
Once the update is complete, remove unnecessary packages before upgrading to Debian 12 with:
sudo apt --purge autoremove
Step 2: Edit the files sources.list
With installed packages updated and upgraded, you need to edit the sources.list file to update the details of the package sources. Open the source file with your favorite text editor:
sudo nano /etc/apt/sources.list
Next, replace all instances of "bullseye" in the file with "bookworm".
If you are using Nano, save the changes by pressing Ctrl + O . Then exit the editor by pressing Ctrl + X .
Step 3: Update installed packages on Debian
Now that you have the sources pointing to the Debian 12 repositories, it's time to update your packages. You can do so with the apt update command:
sudo apt update
Once the system updates, it's time to upgrade your existing packages without adding any new packages to the upgrade process:
sudo apt upgrade --without-new-pkgs -y
During the update process, follow the on-screen instructions and provide input if necessary.
Step 4: Perform a full system upgrade
With all the updates in place, it's time for the final upgrade to Debian 12 "Bookworm". Run the following command to upgrade your system to the latest Debian version:
sudo apt full-upgrade -y
After executing the full upgrade command, you must enter your sudo password. The upgrade process also takes time, so you should sit back and wait until the system upgrades.
Step 5: Reboot into Debian 12
When the installation is complete, reboot the system with the reboot command or via the Restart button:
sudo reboot
When the system reboots, you should see a login screen with the Debian 12 logo. Confirm the upgrade by checking the version number of the operating system with the lsb_release and cat commands:
lsb_release -d cat /etc/debian_version
Extra step: Remove unwanted packages
Once the Debian 12 upgrade is finally complete, you can remove any unwanted packages that may have been carried over from the previous OS installation with:
sudo apt --purge autoremove -y
Download and install Debian 12 via ISO image
There is another way to download and try Debian 12 if you are not already using Debian 11 Bullseye. You can download the official ISO image from Debian's website and install it directly on your machine or on a virtual machine if you want to try it out before installing.
You should read it
May be interested
- How to Install Debiandebian is an operating system based on the gnu/linux build. the debian operating system, like most other linux distributions, is free and open source. it is a popular operating system for both desktop and server use, spawning several...
- Configure mouse settings on the Debian systemdebian allows you to create as many configurations as possible in the system modules. in this article, tipsmake.com will describe how to configure mouse settings on a debian system.
- How to Install Wireshark on Debian 11wireshark is a free and open source packet analyzer. it allows users to check data from the network directly or from the capture file on the drive.
- How to set the JAVA_HOME path in Debian 10in this article, we will learn how to install java jdk on the debian operating system and then set the java_home and path variables.
- How to reset the password for sudo in Debianthe user password is changed in debian using the passwd command. in this article, tipsmake.com will explain how root users can change their own passwords on debian servers.
- How to install Qmmp on Debian 10qmmp is a feature-rich audio player with support for many formats. in this article, tipsmake.com will introduce two ways to install / uninstall qmmp on debian
- How to install Arduino IDE on Debian 10arduino ide (integrated development environment) is open source software used to interact with arduino control boards. using it, you can connect and communicate with the arduino hardware.
- How to install and use PHP Composer on Debian 11php composer is a dependency manager for php. this dependency manager supports application development and the process of calling libraries and frameworks.
- How to disable color emojis in Debian 10 (Buster)to keep up with the latest android color emojis you see in messaging apps and web browsers, debian 10 has replaced old black and white emojis with new colored icons.
- How to enable / disable automatic login in Debian 10if your system is in a secure location, without any privacy threats, you can avoid the hassle of providing credentials when logging in.