If you are looking for the most stable Linux distribution, sure, Debian is the right choice.
Especially if you are planning to use it on servers.
But, on the desktop side, things are a bit different. I mean, you are given packages that are at least a year old and support for new-age hardware is even worse.
So what do you do in those cases, Well, you can use Debian testing!
But before jumping to the explanation part, letโs briefly understand Debian testing.
What is Debian Testing?
Debian offers you 3 variants of Debian:
- Debian stable (what you get by default from their homepage).
- Debian testing (has newer packages and breaks less often than Debian unstable).
- Debian unstable (has the most recent packages and is considered the most fragile of all).
So Debian testing can be considered a sweet spot between stability and fresh packages.
Iโve been playing around with Debian testing for some time and havenโt faced any issues.
In fact, many Debian users prefer the testing variant over the stable version. Despite the name testing, it is pretty usable.
But still, I would recommend you to experiment with this on VM, try using it with your primary tools and if things go well, you can apply those changes in the main system.
Switch from Debian stable to Debian testing
Warning: You can not downgrade from Debian testing to Debian stable, as installer scripts and installation tools are only designed to replace the older version with the new one.
Also, I would recommend using timeshift to create a backup before applying the shown steps on your main machine.
First, update the existing packages using the given command:
sudo apt update && sudo apt upgrade -y
Next, make a copy of original sources.list
file:
sudo cp /etc/apt/sources.list sources.list.backup
Now, letโs start with the first step.
Step 1: Edit sources.list file
There are two ways of editing sources.list
file. Either you can manually alter the current release name with testing
or you can use the sed command to get your job done.
And Iโm going with a 2nd one to make the whole process easier. You just have to use the given command, and it will replace bullseye
with testing
for you:
sudo sed -i 's/bullseye/testing/g' /etc/apt/sources.list
Now, open your terminal and use the given command to open sources.list
files:
sudo nano /etc/apt/sources.list
And comment out the lines having security.debian.org
and anything that ends with -updates
as shown below:
If you are using nano as I do, you can press Alt + /
to jump to the end of the line. And then you have to add the following line:
deb http://security.debian.org testing-security main
And save the changes and exit from the nano text editor.
Step 2: Update the Repository and install new packages
Now, update the repository index, and it will show you a massive update pending:
sudo apt update
Now, you can use the given command, and it will get you the most recent packages:
sudo apt upgrade
Sit back and relax as it is going to take a while.
Once done, it will present you with the list of changes made as you switched from Debian stable to testing:
You can read if you want or you can just press q to proceed further.
Now, it will show you the message that some of the libraries installed on your system needs to restart. Press the TAB key, and it will select the OK option, and then press Enter:
Next, it will ask you whether you want to restart services during the package upgrade. Here you have a choice. As Iโm doing this for desktop usage only, I will go with YES
:
Once done, you can reboot your system and then use the following command to have full effect from the changes youโve just made:
sudo apt full-upgrade
Now, reboot your system, and youโll have the most recent packages. Such as I was running GNOME 43 when I got into the system:
Wrapping Up
In this tutorial, I explained how you could switch from Debian stable to Debian testing. I hope this will be helpful to you.
And if you face any issues or have any queries, let me know in the comments.