How to Switch from Debian Stable to Testing

Debian Stable usually offers older software versions. Switching to the Testing branch gives you recent software with the classic Debian experience.
Warp Terminal

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:

comment out security sources

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
2. add line to keep track of testing in debian

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
update repository in linux

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:

packages that are updated when switched to debian 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:

libraries needs to be restarted after update

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:

restart services during package upgrades without asking?

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:

running gnome 43 in debian

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.

About the author
Sagar Sharma

Sagar Sharma

A software engineer who loves to write about his experience with Linux. While reviving my crashed system, you can find me reading literature, manga, or watering my plants.

It's FOSS

Making You a Better Linux User

It's FOSS

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.