Apt is a mainstream package management tool. Apt is used by Debian, Ubuntu and a lot of different distributions. Package administration job can be done with Apt very easily. Installing new packages, removing packages, updating packages, resolving dependency of packages, etc. Big distributions like Debian, Ubuntu provides repositories. There are a lot of 3 party repositories provides up to date and useful packages. How can we add these repositories to our Linux system?
Add Repository To The Sources.list
Sources.list hold repository information and configuration like repository package URL or path. Repository usage type etc.

Add following line so the /etc/apt/sources.list file
deb http://us.archive.ubuntu.com/ubuntu/ yakkety universe
- deb means we want to add only binary packages from URL
- saucy is the release of the distribution
- universe enables community provided free packages too
Add Repository With Add-apt-repository
We have a more practical way to add a repository. Using add-apt-repository is easier.
$ sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ yakkety universe"
- Providing -y will all questions yes
Four Main Repositories
There are four main repository effects installation of packages. All repository type includes different type of packages as described below
-
Main – Canonical-supported free and open-source software.
-
Universe – Community-maintained free and open-source software.
-
Restricted – Proprietary drivers for devices.
-
Multiverse – Software restricted by copyright or legal issues.
.Update Apt Cache To Get New Package List
We will update our repository caches to get a new list of packages
$ apt-get update