What are Repositories?
There are literally thousands of Ubuntu programs available to meet the needs of Ubuntu users. Many of these programs are stored in software archives commonly referred to as repositories. Repositories
make it easy to install new software, while also providing a high level
of security, since the software is thoroughly tested and built
specifically for each version of Ubuntu.
Ubuntu
distinguishes between software that is "free" and software that is not
free. For details of Ubuntu's Free Software Philosophy please see here.
The four main repositories are:
- 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.
The Ubuntu Install
CDs contain software from the "Main" and "Restricted" repositories, so
if you have no internet connection you can still install software from
the CDs. If you have an internet connection you can install software
from any Ubuntu repository.
This page describes how to manage software repositories in Ubuntu. For Kubuntu please see Kubuntu repository management.
GUI-based
repository management is normally accomplished via "Software Sources".
This interface can be accessed via several methods. One method is to go
through the "Ubuntu Software Center". Open the software center, then
from the Edit menu select "Software Sources". Note: You will have to
enter your password to change settings in this window.
You can download a copy of a Canonical repository for your machine architecture (for example, i386) and use it offline (see AptGet/Offline/Repository).

Ubuntu Software Tab

The Four Main Repositories
The "Ubuntu Software" tab displays a list of repositories or "Channels". The four main repositories are:
- 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.
For a detailed description of these repositories, see Repositories.
To disable a repository temporarily, untick the checkbox next to its name.
Select
"Close" to save your changes. A dialog box should appear, asking
whether you'd like to update the list of repositories. Select "Reload"
to update the list.
The Close, Reload, and Revert buttons each perform special functions with regard to the repository pages.
- Close. The 'Close' button must be selected to execute any change(s). If the action would change system files, they are written at this time.
- Reload. Any time a setting is changed which alters a repository setting the 'Reload' button should be selected to allow the applicable repository database to be updated. Repository information will not normally be updated until the 'Reload' button is selected. If you do not wish to use 'Reload', select 'Close' to exit without updating the database.
- Revert. The 'Revert' button erases changes made since the last save. It merely cancels pending changes which have not been executed, returning the selections to their prior state. The button does not return system files to the original installation settings.
Download Server
Copies
of the main repositories are available on different servers round the
world. The fastest server for you will often be a server close
geographically to you.
If
you have problems with your current server (for example, the server is
slow or you cannot find a package you expect) then select another server
by clicking the "Download from:" list.
If
you click "Select Best Server", Ubuntu will attempt (on this occasion
only) to find the fastest server. Once you select a server it remains
the selected server until you change it. Note: The fastest server now
may not be the fastest server at another time.
CD-ROM/DVD
The
option to install from CD-ROM may be selected or deselected from this
window (in the section "Installable from CD-ROM/DVD").

If
the option is selected, the system will attempt to search the CD-ROM
during package installs. If the CD-ROM is not present, the system will
request its insertion.
Deselect
this option if you do not plan to install packages from CD-ROM. Once
the option is deselected the system will no longer check if a CD-ROM is
present.
Other Software Tab
Enabling Canonical Partner Repositories
The
"Other Software" tab is where you can enable Canonical Partner
Repositories. The partner repositories offer access to proprietary and
closed-source software and are disabled by default. If you wish to
enable a partner repository, tick it, enter your password, click
"Close", and then click "Reload".
In
the screenshot below two partner repositories are listed - one for
applications (enabled) and one for source code (disabled).

CD-ROM/DVD
You
can add software sources on CD-ROM/DVD using this tab. To add such a
source, insert the CD-ROM/DVD and click the "Add Volume" button. Once
you have added the CD-ROM/DVD, it will be searched for packages during
installation requests.
Adding Personal Package Archives (PPAs)
Personal
Package Archives (PPAs) are a kind of repository. Developers create
them in order to distribute their software. In order to add a PPA you
need its "location", which is in the format ppa:[username]/[ppaname]. You can find this information on the PPA's Launchpad page.

To add a PPA to your system's software sources:
- Navigate to Ubuntu Software Centre > Edit > Software Sources > Other Software.
- Click Add.
- Enter the PPA's location (as described above).
- Click Add Source.
- Enter your password.
- Click Authenticate.
- Click Close.
- If you are asked if you want to reload the information about available software, click Reload.
You have now added the PPA and can install packages from it.
Adding a PPA using the command-line
Make sure you have the package python-software-properties installed.
Step 1:
On the PPA's Launchpad page, look for the heading that reads "Adding
this PPA to your system". Make a note of the PPA's location, which has
the format ppa:user/ppa-name.
Step 2: Open a terminal and enter:
sudo add-apt-repository ppa:user/ppa-name
Replace 'ppa:user/ppa-name' with the PPA's location that you noted above.
Your
system will now fetch the PPA's key. This enables your system to verify
that the packages in the PPA have not been interfered with since they
were built.
Step 3:
Now, as a one-off, tell your system to pull down the latest list of
software from each archive it knows about, including the PPA you just
added:
sudo apt-get update
Now you're ready to start installing software from the PPA!
Adding Extra Repositories
There
are times when you might want to add extra repositories to your
system's software sources (that is, in addition to the repositories
provided by Canonical). For example, there is at least one repository
that "caters to the Ubuntu gamer".

In
order to add a repository you need its "location" and the "key command"
(the command that will add the repository's key to your system). For an
explanation of the format of the "location", see the Editing Repository Details section below.
To add a repository to your system's software sources:
- Navigate to Ubuntu Software Centre > Edit > Software Sources > Other Software.
- Click Add.
- Enter the repository's location.
- Click Add Source.
- Enter your password.
- Click Authenticate.
- Click Close.
- If you are asked if you want to reload the information about available software, click Reload.
- In a terminal enter the "key command".
You have now added the repository and can install packages from it.
Editing Repository Details
To edit a repository's details, select the repository in the list and click the Edit button. A dialog box displays the apt line, broken up into its components.

The fields are as follows:
- Type designated as "binary" (deb) for software in binary format or "Source" (src) for source code format. Select the option that corresponds to the repository.
- URI Enter a valid Uniform Resource Indicator or URI for the software repository. Here's a list of examples:
- cdrom
cdrom:[description_of_cd]/
- ftp
ftp://ftp.domain.ext/path/to/repository
- http
http://www.domain.ext/path/to/repository
- smb (works only when the computer is connected to a Samba share)
smb://path/to/repository
- nfs (works only if the computer is connected to a NFS share)
file://path/to/local/directory
- Distribution
Select the name of the distribution or the name of the distribution version. - Components
Select the repository section to access. Add more sections separated by spaces. - Comment
Add a comment to describe the repository for easier reference.
Removing & Disabling Repositories
The "Other Software" tab lists your repositories and PPAs (except for Main, Universe, Restricted, and Multiverse).
To
disable a repository temporarily, untick the checkbox next to the
source. You can enable the repository again by re-ticking the checkbox.
To remove a repository permanently from the list, highlight the repository and click "Remove".
Updates Tab

The
Updates tab is where you set when and how Ubuntu receives system
updates. If you make any changes don't forget to "Close" and "Reload" so
that your system's software sources will be updated.
Install updates from:
- "Important security updates (...)". Updates that fix security vulnerabilities. They are managed by the Ubuntu Security Team and are designed to change the behavior of the package as little as possible -- in fact, the minimum required to resolve the security problem. As a result, they tend to be very low-risk to apply and all users are urged to apply security updates.
- "Recommended updates (...)". Updates for serious bugs other than security vulnerabilities.
- "Unsupported updates (...)". New versions of packages which have been backported to an older release. Packages may contain new features, may introduce new interfaces, and bugs. Such updates are not supported by Canonical on the release they have been backported to but they have been tested by members of the Ubuntu community. For more information on backports, visit UbuntuBackports
Automatic Updates
This section allows the user to set the frequency and manner of updates.
Notify me of a new Ubuntu version:
Allows users to upgrade to new versions of Ubuntu.
- "Normal Releases" - Notifies the user of an upgrade from one regular release to another, such as from Ubuntu 12.10 (Quantal Quetzal) to Ubuntu 13.04 (Raring Ringtail).
- "Long Term Support Releases Only" - Notifies the user of an upgrade between Long Term Support releases, such as from Ubuntu 10.04 (Lucid Lynx) LTS to Ubuntu 12.04 (Precise Pangolin) LTS but not to other distributions which were not designated Long Term Support releases.
Authentication Tab

The
Authentication tab lists the keys for your repositories (but not your
PPAs). Note: PPAs do have keys but the system handles them automatically
and they are not listed here.
When
you add a repository to your system's software sources the maintainer
of the repository will normally tell you how to add the key.
If
the maintainer does not tell you how to add the key then you need to
find the "key hash" of the repository in order to look up the key on a
public key server. Once you know the key hash, the key can be retrieved
using the command:
gpg --keyserver [name of keyserver] --recv-keys [keyhash]
For example, if the key hash is CE49EC21, you retrieve the key using the command:
gpg --keyserver subkeys.pgp.net --recv-keys CE49EC21
Then, add the key to Ubuntu's apt trusted keys database using the command:
gpg --export --armor CE49EC21 | sudo apt-key add -
Note: There's a dash at the end of the line above.

Integration with Ubuntu Software Center

Ubuntu Software Center
is the GUI-based method to add or remove applications. It allows the
user to selectively choose the repositories to be searched and then
presents a list of applications with a brief description of each
application.
By
default Ubuntu Software Center searches all (enabled) repositories. If
you wish to search one repository only then click the down arrow to the
right of All Software and select the repository that you wish to search.
Software Sources
is accessible from the Ubuntu Software Center via the Edit, Software
Sources menu. The contents of Ubuntu Software Center are updated
whenever a repository is added, deleted or changed via Software Sources.
While the repository list is updating the Progress icon is displayed in
the top bar of Ubuntu Software Center.
Exploring the Repositories
There
are several GUI-based methods you can use to explore the repositories.
One is to open Synaptic Package Manager and click on the Origin
button. This will display a repository list in the window above the
button. The list will contain all the repositories enabled in your
system's software sources. To the right will be the packages available
via download (white boxes) and currently installed packages (green
boxes).
There are two cropped images of the main Synaptic window below:
- The image on the left shows the results of selecting Local/main (packages from the Main repository stored locally). Local packages are packages stored on the user's computer.
- The image on the right displays the results of selecting archive.ubuntu.com/main (the Main repository).

Finding a Package's Repository
It
is sometimes useful to find a package's repository (the repository that
the package was installed from). If you highlight the package and click
the Properties button you may be able to determine the repository in the Section:
area. The name in parentheses (if any) is the repository. For example,
from the screenshot below we can see that the rar package's repository
is Multiverse.

Another method to find a package's repository is to visit http://packages.ubuntu.com/.
The search box is an easy method to quickly locate a package maintained
by the Ubuntu team. Several input selections are available to help the
user refine the search.
(Note: Some packages are not available from a repository or PPA, instead they are available as Debian packages.)
No comments:
Post a Comment