News
Seven days of Black Friday madness — great deal from Serverspace!

THE NEW YEAR
WHEEL OF FORTUNE

Spin the wheel and win a guaranteed prize right now!

By registering, you are signing up to receiving emails.
JH
Joe Harris
November 12 2020
Updated December 11 2024

How to Configure Repositories on Ubuntu 20.04

Linux Ubuntu

Using another OS?

Select the desired version or distribution.

Software installation on Linux systems is performed from repositories, which by default contain a large number of packages. But sometimes there are situations when the necessary software is not included, or the version is too old. In this case, you can add the necessary repository and install from it.

How to configure repositories on Ubuntu 20.04:

Be careful when performing this operation, because sometimes such builds contain experimental versions of system software and even the Linux kernel. Therefore, you should carefully study the information about the third-party repository in its description and update manager.

In this tutorial, we will configure repositories on Ubuntu server 20.04.

List of repositories in Ubuntu

To view all repositories in the system:

nano /etc/apt/sources.list

They can also be located in one of the files in the /etc/apt/sources.list.d/ folder.

To disable one of the repositories, just comment out its line.

# deb http://archive.ubuntu.com/ubuntu focal multiverse

Adding repositories in Ubuntu

To add a repository you need to find out its address from the software developer and use the apt-add-repository command with the following syntax:

apt-add-repository ‘deb http://repository_address version branch’

Sometimes you need to install the GPG security key first. Let's take MariaDB as an example.

apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'

Adding repository:

add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://mirror.mephi.ru/mariadb/repo/10.5/ubuntu focal main'

Removing repositories

To remove a repository use this command:

add-apt-repository --remove 'deb [arch=amd64,arm64,ppc64el] http://mirror.mephi.ru/mariadb/repo/10.5/ubuntu focal main'

PPA repository in Ubuntu

During the installation of the PPA repository, the system automatically recognizes the repository and downloads the necessary keys.

apt-add-repository ppa:repository/ppa

To remove PPA repository:

apt-add-repository --remove ppa:repository/ppa

After editing the list of repositories, don't forget to update the list of packages in the system.

apt update

Vote:
3 out of 5
Аverage rating : 3.8
Rated by: 14
1101 CT Amsterdam The Netherlands, Herikerbergweg 292
+31 20 262-58-98
700 300
ITGLOBAL.COM NL
700 300
We use cookies to make your experience on the Serverspace better. By continuing to browse our website, you agree to our
Use of Cookies and Privacy Policy.