Quick Links
Summary
Debian Linux uses theAPT package managerwhich depends on a list of repositories to install packages. If you want to use software packages not included in the official Debian repositories, you’ll need to add them yourself. If you’re in that situation, this tutorial will show you how to add third-party repositories to your Debian system.
We’ll be covering multiple methods here. you’re able to choose the one that seems most convenient to you. If you aren’t sure which is best for you, but you’re using the GNOME desktop, we recommend the Software & Updates method below.

For demonstration, we’ll be showing everything on the Debian 12 version with GNOME Desktop Environment. However, these methods will work on older versions such as Debian 10 and 11.
Add a Repository to Debian Using the “Software & Updates” Tool
If you’re also using theGNOME Desktop Environmentlike us, you should have a tool called “Software & Updates,” which lets you add repositories in a few clicks.
On your home screen, click on “Activities” in the top left corner of your screen.

In the search bar, start typing “Software & Updates”. You should see the tool appear. The icon has a globe on it. Click on that icon to open it.
When the tool launches, you will notice four tabs. Click on the “Other Software” tab.

You will see a list in that tab. At the bottom, press the “Add” button.
Now you need to input the third-party repository URL in the below format:

Here, the “deb” keyword refers to the repository type. Then, you add theURLor link to that repository. After the URL, add the distribution name (bullseye, bookworm) or class (stable, testing). Lastly, you add the type of component (main, contrib, non-free). This string is what Debian refers to as an APT line.
In our example, we’ll add the repository ofWine. Following the above format, it will look like this:

Enter your APT line in the text box. Then press “Add Source.”
You’ll be asked to enter your password. Enter it and press “Authenticate.”

And that should add the repository to your list.
Add a Repository to Debian by Editing the sources.list File
This is the traditional way of adding new package repositories to Debian Linux. All the available repositories are listed in the “sources.list” file which is located in the “/etc/apt” directory. First, let’s open the file to see how things work. You can open the file in your preferred text editor. For this tutorial, we will work on theNano text editor.
To open the file in Nano, run the below command:
you may see all available repositories from the screenshot. You must add your repository in the below format:
If we want to add the repository of Wine in the file, for example, this is the line we need to add:

Enter your repository with the proper format into the file.
Once done, save the file with the Ctrl+O keyboard combination. Then exit from the editor with Ctrl+X.
To make the changes take effect, update the repository cache with this command:

And the new repository should work now.
Add a Repository to Debian Using the add-apt-repository Command
The last method we will show you is a simple command to add repositories to Debian. This command can add third-party repositories as well asPersonal Package Archive (PPA)to the sources.list file. The syntax is as follows:
So now let’s use this command to add our sample repository.

When asked, press the Enter button to confirm.
Depending on what repository you’re adding, you may need to sign the repository with aGPG keyfor verification. Otherwise, the command will fail to add the specified repository.
If you try to add a repository that already exists, then you’ll get a message saying that. See the below example:

After adding the repository, you need to update the repository list for the changes to take effect. Update your system with this command:
And that should add your target repository.
If you want to remove a repository, you’re able to add the –remove flag for that in the command. Let’s remove our added repository. See the below command:
That successfully removed the repository.
Debian Repositories Unlocked
Now you know how to add third-party repositories on Debian Linux systems. With this new knowledge, you’re able to overcome the software limitations you previously faced and install your favorite applications such asSteam, or development tools likeDocker.