Table of Contents
In this article, I will take you through the steps to enable or disable universe, multiverse and restricted repository on Ubuntu 20.04 but before that let me ask you a quick question. Do you know why Ubuntu has different types of repositories ? If you are still thinking then let me tell you Ubuntu usually distinguishes between software that is "free" and software that is not free. So all the software which are released under Open source License kept in one repository and all the software which are under copyright claim are kept under another repository. Similarly all the other softwares are divided and kept in other repositories. We will see more about this in below section. More on Ubuntu Official Page.
What are Repositories
Repositories are basically a software archive where thousands of programs are kept and stored based on their updated versions so that one can download and install using some packet manager like apt or apt-get whenever required.
Types of Repositories
On Ubuntu, there are mostly four types of repositories:-
- Main
- Universe
- Multiverse
- Restricted
How to Enable Universe, Multiverse and Restricted Repository on Ubuntu 20.04
Also Read: How to Install Ntopng to Monitor Network Traffic on Ubuntu 20.04 LTS
Of all the four repositories, we are going to discuss broadly about Universe, Multiverse and Restricted Repositories.
a) Universe Repository
This repository is mostly used to store open source software. You can enable Universe repository by using apt-add-repository universe
command.
root@localhost:~# add-apt-repository universe
'universe' distribution component enabled for all sources.
Hit:1 http://in.archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Hit:3 http://ppa.launchpad.net/ansible/ansible/ubuntu focal InRelease
Get:4 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:5 https://apt.releases.hashicorp.com focal InRelease [4,419 B]
Get:6 https://packages.microsoft.com/repos/edge stable InRelease [7,343 B]
Hit:7 http://ppa.launchpad.net/micahflee/ppa/ubuntu focal InRelease
Get:8 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:9 https://packages.grafana.com/oss/deb stable InRelease
Get:10 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,302 kB]
Get:11 http://in.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [553 kB]
b) Multiverse Repository
This repository is used to store all the software restricted by copyright or legal issues. Like above, you can enable multiverse
repository by using apt-add-repository multiverse
command.
root@localhost:~# add-apt-repository multiverse
'multiverse' distribution component enabled for all sources.
Hit:1 http://in.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:4 https://packages.microsoft.com/repos/edge stable InRelease
Hit:5 https://apt.releases.hashicorp.com focal InRelease
Hit:6 http://ppa.launchpad.net/ansible/ansible/ubuntu focal InRelease
Hit:7 http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease
Hit:8 http://ppa.launchpad.net/micahflee/ppa/ubuntu focal InRelease
Hit:9 https://packages.grafana.com/oss/deb stable InRelease
Hit:10 http://security.ubuntu.com/ubuntu focal-security InRelease
Get:11 http://in.archive.ubuntu.com/ubuntu focal/multiverse i386 Packages [74.7 kB]
Get:12 http://in.archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [144 kB]
c) Restricted Repository
This repository is used to store proprietary drivers for all the devices. So to enable Restricted repository you need to use apt-add-repository restricted
command.
root@localhost:~# add-apt-repository restricted
'restricted' distribution component enabled for all sources.
Hit:1 https://packages.microsoft.com/repos/edge stable InRelease
Hit:2 https://apt.releases.hashicorp.com focal InRelease
Hit:3 http://ppa.launchpad.net/ansible/ansible/ubuntu focal InRelease
Hit:4 http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease
Hit:5 http://in.archive.ubuntu.com/ubuntu focal InRelease
Hit:6 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:7 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:8 http://ppa.launchpad.net/micahflee/ppa/ubuntu focal InRelease
Hit:9 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:10 https://packages.grafana.com/oss/deb stable InRelease
Get:11 http://in.archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [22.0 kB]
How to Check all the Enabled Repository
If you want verify all the enable repository, then you need to check the contents of /etc/apt/sources.list
file. All the repository added in this file shows that it is enabled. Since all the added repository starts with deb keyword so if you just search for all the lines starting with deb keyword then you will get the information of all the enabled repository as shown below.
root@localhost:~# grep ^deb /etc/apt/sources.list
deb http://in.archive.ubuntu.com/ubuntu/ focal main universe multiverse restricted
deb http://in.archive.ubuntu.com/ubuntu/ focal-updates main universe multiverse restricted
deb http://in.archive.ubuntu.com/ubuntu/ focal-backports main universe multiverse restricted
deb http://security.ubuntu.com/ubuntu focal-security main universe multiverse restricted
deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main
deb [arch=amd64] https://apt.releases.hashicorp.com focal main
deb http://apt.postgresql.org/pub/repos/apt focal-pgdg main
deb https://packages.grafana.com/oss/deb stable main
How to Disable Universe, Multiverse and Restricted Repository on Ubuntu 20.04
If you want to disable a repository then you need to use -r
option with add-apt-repository
command. For example, to disable universe
repository, you need to use add-apt-repository -r universe
command. Similarly to disable multiverse
repository, you need to use add-apt-repository -r multiverse
command and likewise to disable restricted
repository, you need to use add-apt-repository -r restricted
command as shown below.
root@localhost:~# add-apt-repository -r universe 'universe' distribution component disabled for all sources. root@localhost:~# add-apt-repository -r multiverse 'multiverse' distribution component disabled for all sources. root@localhost:~# add-apt-repository -r restricted 'restricted' distribution component disabled for all sources.