Mike Barkas

Software and DevOps

Mike Barkas

Mike Barkas

Software and DevOps

Linux Package Manager Sources

April 11, 2025

Linux package managers rely on software repositories, which are servers that store packages (software and updates). Each Linux distribution uses a different package manager and a specific format for its repository sources.

# Examples of using Linux package managers

# Debian
apt install my-package

# Arch
pacman -S my-package

# Fedora
dnf install my-package

Software that is included in distro repositories are often outdated. Sometimes the version of an application that you install via the distro’s package manager is not current with an actively maintained software repo.

These repos are listed in a file system, each distro does this a little differently. It is easy to do a Duck Duck Go search for your distro to find out where the repo source files live.

My Podman Compose Error

I like to use Podman when I can instead of Docker. I was working on a compose.yaml file to run a couple containers with podman-compose and I received an error.

The error itself is not important, but after doing a search I found out that the bug was fixed in a newer version of the podman-compose package.

To fix this issue I needed to remove the current version of podman-compose and add a new repository source so my package manager could access the newer version.

Debian Backports

The Debian distro has what is called Backports and this provides some updated software versions. Debian Backports provides new packages with new features on some versions of Debian.

For this project I am using Debian Bookworm with the apt package manager. The manpages will provide lots of information on how to use apt.

More about Debian Backports

Add New Debian Repository

The Debian package manager apt, uses the source configuration located at /etc/apt/sources.list. This is where apt looks for software to update or install.

Like many configuration files in Linux, you would not need to edit the default configuration file, you would add your file in the sources directory and Linux will see it.

Add your source file(s) in the /etc/apt/sources.list.d/ directory.

# Example Backports Bookworm source file

# /etc/apt/sources.list.d/backports.sources

Types: deb
URIs: http://deb.debian.org/debian
Suites: bookworm-backports
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

After adding the source definition, you will need to apt update to update the package list.

Install Package using Backports

Now that you have access to the Backports software repository, you can install a package and target this repo.

# Target Backports to install a package
sudo apt install -t bookworm-backports my-package

Source File Types

Be careful with the file extension (file types) when adding to your sources list.

The apt package manager reads .list files and .sources file types. The syntax for each of these files are very different.

Using a file with the .sources extension is the modern apt format. This format is recommended over .list for newer systems as it’s more flexible and structured.

Read more about sources.list in the Debian docs