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).

IconsPage/info.png The operations described on this page modify the software repositories configuration file /etc/apt/sources.list. If you wish to, you can modify this file directly. For further details please see Managing Repositories from the Command Line.

Ubuntu Software Tab

Software Sources.png

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.

  • Repobuttons.png

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").

Software Sources.png

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).

Other Software tab_001.png

CD-ROM/DVD

Other CD-ROM/DVD sources may be added on this tab. Click the "Add CD-ROM" button after inserting a CD-ROM containing packages. After adding 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.

IconsPage/warning.png Packages in PPAs do not undergo the same process of validation as packages in the main repositories. PPAs are a low-security alternative to the main repositories, so the user will be installing software at their own risk.

To add a PPA to your system's software sources:

  • Navigate to Ubuntu Software Centre > Edit > Software Sources > Other Software.

    Other Software tab_001.png

  • Click Add.

    Add-PPA.png

  • Enter the PPA's location (as described above).
  • Click Add Source.

    Authenticate_001.png

  • 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".

IconsPage/warning.png Make sure that any repositories that you add have been tested and are known to work on Ubuntu systems. Repositories that are not designed to work with your version of Ubuntu can introduce inconsistencies in your system and might force you to re-install.

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 Repositories section below.

To add a repository to your system's software sources:

  • Navigate to Ubuntu Software Centre > Edit > Software Sources > Other Software.

    Other Software tab_001.png

  • Click Add.

    Add-PPA.png

  • Enter the repository's location.
  • Click Add Source.

    Authenticate_001.png

  • 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 Repositories

To make changes to a repositories list, select it in the list and click the Edit button. A dialog box displays the apt line, broken up into its components.

  • SoftwareSources-EditSource.png

  • 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.
    (raring in the example above.)

  • Components
    Select the repository section to access. Add more sections separated by spaces.
    (The example repository has a partner section.)

  • 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

  • SoftwareSources-Updates.png

The "Updates" tab is where you will be able to set when and how Ubuntu receives system updates.

Ubuntu Updates

  • "Important Security Updates (raring-security)". Patches for security vulnerabilities in Ubuntu packages. 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 (raring-updates)". Updates for serious bugs in Ubuntu packaging that do not affect the security of the system.
  • "Pre-released Updates (raring-proposed)". The testing area for updates. This repository is recommended only to those interested in helping to test updates and provide feedback.
  • "Unsupported Updates (raring-backports)". As the name states, these are unsupported new versions of packages which have been backported to an older release. Packages may contain new features, may introduce new interfaces, and bugs.

    For more information on backports, visit UbuntuBackports

Automatic Updates

This section allows the user to set the frequency and manner of updates. If the 'Check for updates' box is not selected no other options in this section may be set.

Release Updates

Allows users to upgrade to new versions of Ubuntu.

  • "Normal Releases" - Allows 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" - Allows 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.

If you made any changes don't forget to "Close" and "Reload" so the repositories will be updated.

Authentication Tab

  • SoftwareSources-Authentication.png

"Authentication keys" are usually obtained from the maintainer of the software repository. The maintainer will often place a copy of the authentication key on a public key server such as www.keyserver.net, but you need the "key hash" to find it. For instance, in the image above, the fourth entry is the PPA for Mozilla Team. If you go to its web page (https://launchpad.net/~mozillateam/+archive/ppa), you'll find the text snippet "Signing key: 1024R/CE49EC21"; the latter part of this is the key hash (CE49EC21).

Once the key hash is known, the key can then be retrieved using the command:

  • gpg --keyserver [name of keyserver] --recv-keys [keyhash] 
  • For instance, you could import the maintainer's authentication key, whose hash is CE49EC21, as follows:
    gpg --keyserver subkeys.pgp.net --recv-keys CE49EC21 
  • Then, add the key to Ubuntu's apt trusted keys database with the following command:
    gpg --export --armor CE49EC21 | sudo apt-key add - 
  • Note there's a dash at the end of the line

IconsPage/info.png For more on apt and authentication keys, see SecureApt.

Finding a key hash

(Missing section)

Integration with Ubuntu Software Center

  • UbuntuSoftwareCenter.png

Ubuntu Software Center, which originated with Ubuntu 9.10, is the GUI-based method to add both free and non-free applications and replaces the Add/Remove feature of earlier Ubuntu releases. It allows the user to selectively choose the repositories to be searched and then presents a list applications with brief descriptions of each program.

Open the application directly from the Main Menu - the Software Center has it's own listing.

The left panel displays the enabled repositories. The right panel lists the applications available from the selected repository.

  • With Get Software highlighted in the left pane, the applications contained in all the repositories listed in the left pane are displayed in the right panel.

  • If an individual repository is highlighted in the left panel, only those applications from the selected repository are displayed on the right.

    SoftwareCenter-Repositories.png

Software Sources is accessible from the Software Center via the Edit, Software Sources menu (see below left).

The contents of 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 left panel of Software Center (see below right).

  • SoftwareCenter-Sources1.png

    SoftwareCenter-Update1.png

Exploring the Repositories

There are several GUI-based methods you can use to explore the repositories. One is to open Synaptic 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 images of the main Synaptic window below.

  • The first 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 second image, on the right, displays the results of selecting archive.ubuntu.com/main (the Main repository).

softwaresources.packages1.png

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.

properties.png

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.

For packages not included in the supported Ubuntu repositories, an internet search using the package name and "deb" may be successful.

Other Links


CategoryPackageManagement

Repositories/Ubuntu (last edited 2016-08-26 10:07:47 by clissold345)