What is a Repository on Linux?

If you click our links and make a purchase, we may earn an affiliate commission. Learn more

Linux distributions use repositories to distribute software packages. A repository is simply a central server, usually hosted by the distribution maintainer or an application editor, where all supported packages are stored.

Each distribution offers different servers that can be accessed through their package manager (APT on Debian-based systems). This allows us to get the official, secure versions of software, and makes updates easier by keeping track of dependencies between packages.

When you install any Linux distribution, it comes with at least one default repository connected to the package manager. There is a different repository for each version of the system, and other servers can be connected to get access to even more packages (stable or unstable, official or unofficial, third-party, etc.).

Lost in the terminal? Grab My Pi Cheat-Sheet!
Download the free PDF, keep it open, and stop wasting time on Google.
Download now

Many software publishers rely on their own servers, or repositories, to distribute their application. As with system packages, this ensures that their users automatically get the latest version without breaking dependencies.

Lost in the terminal? Grab My Pi Cheat-Sheet!
Download the free PDF, keep it open, and stop wasting time on Google.
Download now
sources.list on Raspberry Pi OS

On Debian-based distributions (such as Raspberry Pi OS, Ubuntu, etc.), repositories are listed in /etc/apt/sources.list. It’s a text file where you can see which servers and directories your package manager uses to download and install software updates.

Lost in the terminal? Grab My Pi Cheat-Sheet!
Download the free PDF, keep it open, and stop wasting time on Google.
Download now

Video explanation

Lost in the terminal? Grab My Pi Cheat-Sheet!
Download the free PDF, keep it open, and stop wasting time on Google.
Download now

Related articles: