The applications installed in the stable version of Debian don’t get new version updates immediately to maintain the high stability of the system. However, that is not the case with the security updates maintained by the Debian security team. So, what to do to get the new features for installed software because it is not possible for us to compile each software manually to achieve its latest version. This is exactly where the backports come into play.
What are the backports?
As we can understand from the word “backports“, it means to get the newer part of the software and port them to install for the same software with an older version on Debian. Backports of packages from (mainly) testing and (rarely) unstable, which are built against the libraries in the stable. This does not work in all cases, and not all packages have Backports. Since Squeeze the backports have been an official part of the Debian project and are provided with security updates by Debian Security. Individual tools and applications such as LibreOffice can typically be found in the backports, but not complete desktop environments. You can also find newer kernels or newer versions of Mesa there, which can be an advantage for graphics cards.
From the perspective of package management, the package in the subsequent release is always “newer” than the backports package in the current release. This means that there are no conflicts when the release is changed: all backport packages are then updated from the subsequent release.
Backports are pinned to priority 100 using apt-pinning, ie they are only installed when explicitly requested. Otherwise, the package from stable takes precedence. A package that has been installed from the backports is updated from the backports.
Steps to Add or Install Backports on Debian 11 Bullseye
Add The Backports Repository to Debian 11
There are lots of packages that are not available to install directly using the default base system repository of Debian. To get such software packages we have to add their respective repository manually on our Linux system. And the same goes for backports repo.
To add it, edit the sources.list
file.
sudo nano /etc/apt/sources.list
Go to the end of the file and paste the below two lines:
deb http://deb.debian.org/debian bullseye-backports main contrib non-free deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free
To save the file, press Ctrl+O and hit the “Enter” button. Exit the file by pressing- Ctrl + X.
Run system update
Once you have added the backport repository, run the system update command that will update existing packages and refresh the repository cache. So that our system can recognize the packages available in the newly added repo.
sudo apt update
Full Upgrade Debian 11 From Backports
If you want to install all the latest updates available from Backports for installed packages on your Debian 11 Bullseye then simply run the upgrade command given below. Although this doesn’t mean that the system will automatically update through the Backports repository whenever you run the system update command. This only happens when you execute the below-given command, manually. Otherwise, the standard update command will use the system default and stable repo.
sudo apt -t bullseye-backports upgrade
Install Packages From Bullseye Backports
If you wish to install some specific package from the backport repository then you have manually specified the package. backport repo along with -t flag with an APT package manager.
Here is the syntax:
sudo apt install "package-name" -t bullseye-backports
For example, you want to install the latest version of Kernel for new features and driver support.
sudo apt install linux-image-amd64 -t bullseye-backports
In case you want to search the available latest kernel or any other package you can use the following command.
apt-cache search package-name
Ending notes:
So, this was the quick way to add the Bullseye backports in Debian 11 to get the latest version of the stable packages available for this Linux. However, if you are using Debian 11 for production purposes then it is recommended to go for the stable repository packages with long-term compatibility. Whereas, those who want the latest update of some particular package, are always free to use the Backports for that.