Fun with Apt Pinning: Installing Testing Packages in Debian Stable and derivatives


Well my first “project” is really more of a tutorial but I wanted to share how you can easily install Debian testing packages in stable, the stupid way! The Debian team doesn’t recommend you do this and recommend enabling Backports repositories instead, but sadly for a lot of the software I use isn’t available in Backports and it’s usually the software I want a much newer version of. This hasn’t broken my antiX 17.1 install yet which is wonderful since upgrading antiX to Testing or Sid through antiX’s installer has horribly broken things: ifupdown would hang the system for a minute when booting up which would lead to me having to set up my wireless connection again after every boot, fonts in iceWM would mess up and Compton would render everything on the screen as clown vomit. Anyway here’s how to enable testing repos without messing your install:

Step 1: Open up a terminal and type cd /etc/apt/sources.list.d && ls. In antiX you will be looking for both antix.list and debian.list.

Step 2: Now type sudo nano debian.list (you can replace nano with your preffered text editor). In Debian, add the following lines to the file’ and then save and exit:

deb http://ftp.us.debian.org/debian/ testing main contrib non-free

deb http://security.debian.org/ testing/updates main contrib non-free

In antiX, these lines should already be in the file and just need uncommenting (removing the # from the beginning of these lines). It is recommended for the first line that you change the main address to a Debian FTP mirror that is closer to where you live. contrib and non-free do not need to be added to these lines unless you use or rely on Non-DFSG complying or Non-Free software or drivers on your system.

Step 2.5: For antiX users, type sudo nano antix.list and uncomment the following line and then save and exit:

deb http://repo.antixlinux.com/testing testing main nosystemd

Step 3: Now open up a new text file by typing sudo nano. Copy and paste the following and then save and exit:

Package: *

Pin: release a=stable

Pin-Priority: 900



Package: *

Pin: release a=testing

Pin-Priority: 300

Step 4: Now run sudo apt update to sync with the testing repositories. Congrats! Now you can newer versions of software and their dependencies using sudo apt install insertyourpackagenamehere -t testing. Hopefully you shouldn’t horribly break your system doing this, but I make no promises!



This page was last updated 29th of August 2018

Take me back home!