Repositories
Last updated
Last updated
So far I've really only passively mentioned repositories, so i'd like to take a moment to go over them. Repositories are like digital storehouses for software for your computer. They're online collections of programs, updates, and all sorts of tech goodies. When you want to install new software or update existing programs, your computer checks these repositories to see what's available. Think of it like a massive library where you can borrow the latest books (or software) for your system.
Different Linux distributions have their own repositories, and you can add or remove them to access a wide range of software tailored to your needs.
You've got the reins when it comes to deciding which repositories apt
commands tap into. It's all in the setup files stashed away in the /etc/apt
directory. The top dog among these files is sources.list
, and it's the one apt
relies on to figure out where to scout for software. Normally, you'll find a bunch of lines in there with comments describing what's what, and maybe a few extras for optional repositories. But if you're curious about what an uncluttered version looks like with only the active repositories listed, go ahead and peek at the one on your own machine:
If you're up for it, third parties have the option to add their repository details as files in the /etc/apt/sources.list.d
directory
There might be times when you fancy adding a personal repository to your apt
setup manually. It could be for handling your own software project or grabbing something that's not in the usual repositories. You can achieve this through Personal Package Archives (PPAs).
Be extra cautious and double-check that you trust the sources you're adding, as these repositories aren't screened for malware or managed as meticulously as the mainstream ones
Now I know what your first question will be...
"Where do I find PPA's?"
Start by searching online for the software you want to install, along with the term "PPA" or "Personal Package Archive." For example, if you're looking for the latest version of a video editing tool called "MyVideoApp," you might search for "MyVideoApp PPA".
Many PPAs have dedicated websites or pages on platforms like Launchpad (common for Ubuntu PPAs). These pages provide detailed information about the PPA, including its name, description, and the software it contains. For example, a PPA page for the "MyVideoApp" software might look like this:
There are also community forums. Linux user forums and communities often discuss and share information about PPAs. You may find recommendations and links to PPAs in these discussions.
Generally though, you will usually find PPA's as the need arises.
Let's say you want to install an application; you go onto Software Centre or search with apt
and find nothing. So, you get your best google-fu on and you find a website for the software you want to install - in this case, let's say it's skype:
As you can see, we get some results. Clicking on the top one, we are taken to a site that provides the details for a PPA, which, when added using the provided commands, allows us to install skype using apt
:
To add a repository, we can use apt
. Let's walk through the process step-by-step:
Find the PPA First, you must identify the PPA you want to add. You can often find the PPA's information on websites, forums, or the developer's documentation.
Add the PPA
Use the add-apt-repository
command, followed by the PPA's URL or name:
Update APT After adding the PPA, update your package list:
Install Software
Once the update is complete, you can install software from the newly added PPA using apt
just as you would any other piece of software
A Word of Caution
In the screenshot above, you'll notice the commands come with some certificate info for encryption. This stuff matters because we rely on apt
to make sure the software packages we get are the exact ones from the repository. If those keys can't be verified, well, there's no guarantee, and it's best to steer clear of that software
When you add a Personal Package Archive (PPA) to your system, it gets added as a configuration file in the /etc/apt/sources.list.d/
directory. Each PPA typically has its own file named with the PPA's name and a .list
extension.
At some point, you're likely to want to uninstall the software and remove the PPA as it will be redundant. So, to get rid of a PPA, follow these steps:
List PPAs First, you can list the PPAs currently added to your system using the following command:
Identify the PPA
Look for the PPA file that corresponds to the PPA you want to remove. The file names are usually in the format ppa-name-ubuntu-version.list
Remove the PPA
To remove the PPA, you can use the add-apt-repository
command with the --remove
option, followed by the PPA URL or name:
Update APT After removing the PPA, it's a good practice to update your package list with:
Optional Extra: Delete the PPA File
If you want to completely remove the PPA file, you can use the rm
command. For example, if the PPA file is named example-ubuntu-ppa.list
, you can delete it with: