We’ll be covering multiple methods here.
you could choose the one that seems most convenient to you.
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.
On your home screen, select “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.
tap on that icon to open it.
When the tool launches, you will notice four tabs.
hit the “Other Software” tab.
You will see a list in that tab.
At the bottom, press the “Add” button.
Then, you add theURLor link to that repository.
Lastly, you add the key in of component (main, contrib, non-free).
This string is what Debian refers to as an APT line.
drop your APT line in the text box.
Then press “Add Source.”
You’ll be asked to key in your password.
Enter it and press “Authenticate.”
And that should add the repository to your list.
First, let’s fire up the file to see how things work.
you might fire up the file in your preferred text editor.
For this tutorial, we will work on theNano text editor.
Once done, save the file with the Ctrl+O keyboard combination.
Then exit from the editor with Ctrl+X.
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 venture to add a repository that already exists, then you’ll get a message saying that.
revamp your system with this command:
And that should add your target repository.
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.