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 very easy to install new software onto Ubuntu using an Internet connection, while also providing a high level of security, as each program available in the repositories is thoroughly tested and built specifically for each version of Ubuntu.

The Ubuntu software repositories are organized into four separate areas or "components", according to the level of support offered by Ubuntu and whether or not the program in question complies with Ubuntu's Free Software Philosophy.

The repository components are:

  • Main - Officially supported software.

  • Restricted - Supported software that is not available under a completely free license.

  • Universe - Community maintained software, i.e. not officially supported software.

  • Multiverse - Software that is not free.

For more information regarding the Ubuntu Repository components, click here.

The Ubuntu Install CDs contain software from the "Main" and "Restricted" components of the repositories. Once your system is made aware of the Internet-based locations for these repositories, many more software programs are available for installation. By using the software package management tools already installed on your system, you can search for, install and update any piece of software directly over the Internet, without the need for the CD.

Adding Repositories in Ubuntu

This section describes how to manage software repositories in the currently supported Ubuntu releases. For Kubuntu please see Kubuntu repository management.

  • The operations described on this page modify the software repositories configuration file located at
    /etc/apt/sources.list 

info3.png Repository list can also be managed by making direct modifications to this file using the command line. If you prefer to use the command line instead of a graphical user interface, see Managing Repositories from the Command Line instead.

GUI-based repository management is normally accomplished via "Software Sources". This interface can be accessed via several methods. For the latest versions of Ubuntu, the easiest way is to go through the "Ubuntu Software Center". Open the software center, then from the Edit menu select "Software Sources". You will have to enter your password to change settings in this window.

For older versions of ubuntu, there are several options:

  • Main Menu: System > Administration > Software Sources.

  • Synaptic : System > Administration > Synaptic Package Manager : >> Settings >> Repositories.

  • Main Menu: Ubuntu Software Center : >> Edit, Software Sources.

Ubuntu Software Tab

  • SoftwareSources-UbuntuSoftware.png

Adding Ubuntu Software Repositories

The "Ubuntu Software" tab displays a list of repositories or "Channels".

info3.png For a detailed description of these repositories, visit Repositories.

  • The following repositories are enabled by default:
    • "Canonical-supported Open Source software (main)"
    • "Proprietary drivers for devices (restricted)" [hardware-dependent]
    • "Source Code"
    • Note: In Ubuntu 9.04 (Jaunty) and later, the main, universe, restricted and multiverse repositories are enabled by default.

  • Select other repositories to gain access to proprietary drivers, copyrighted material, source code, etc.
    • "Community-maintained Open Source software - (universe)"
    • "Proprietary drivers for devices (restricted)" - Commonly used software which is not available under a completely free license. This software is supported by the Ubuntu team.
    • "Software restricted by copyright or legal issues (multiverse)" - Software that is "not free" and may require licensing. This software is not supported.
  • 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

The repository server is accessed from this page. If you have problems connecting to a server, the server is slow, you cannot find a package you expect to find on the currently-selected server, or simply want to find a faster server, click on the "Download from" window. Options include:

  • "Main Server", "Server for ...", or "Other".

    SoftwareSources-Server.png

  • Selecting "Other" provides the following options:
    • The opportunity to select a participating server anywhere in the world.
      • Expand any of the country listings in the left pane and highlight a server. Then select "Choose Server".
    • Best Server.
      • When selected, the system pings each of the available worldwide servers and determines the best one to use at the present time. At the end of the test the best-performing server is highlighted in the left pane. To enable that server, select "Choose server".

      • The server will remain the default server until changed. Download speeds are not automatically rechecked, so the selected server may not be the "Best Server" at a anothrer time.

    SoftwareSources-ChooseServer.png

CD-ROM/DVD

The install CD-ROM may be selected or deselected from this window.

  • Software Sources.png

  • If selected, the system will attempt to search the CD-ROM during package installs.
  • If selected but the CD is not inserted, a message will be generated requesting it's insertion.
  • Deselect the CD-ROM if you do not plan to use it to install software. This will also end messages to insert the CD-ROM during internet installs.

Third-Party Software Tab

Adding Canonical Partner Repositories

The "Third-Party Software" tab is where you will be able to add the Canonical Partner Repositories. You will see two Canonical Partner repositories listed - one for applications and another for source code (src). The partner repositories offer access to proprietary and closed-source software and are not enabled by default. Users must specifically enable these 'partner' repositories. Select "Close" and "Reload" to save and update the database if you chose to add either or both of them.

  • SoftwareSources-Partner.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 PPAs

Since Ubuntu 9.10, there is an easy way to add Personal Package Archives to the repository list that automatically imports the keys to verify the downloaded software.

Warning.png PPA's do not undergo the same process of validation as packages in the main ubuntu repositories. PPA keys are cryptographically signed but are still a low security alternative to the main repository and so the user will be installing software at their own risk.

As described above, go to Ubuntu Software Centre > Edit > Software Sources > Other Software and click Add. You can then type in an APT line in PPA form, like ppa:[username]/[ppaname].

  • Add-PPA.png

After clicking Add Source and Close, you have to Reload the package list. You can then install packages from that PPA in the Software Center.

Adding PPA through commandline

If you're using the most recent version of Ubuntu (or any version from Ubuntu 9.10 onwards), you can add a PPA to your system with a single line in your terminal.

Make sure you have the package python-software-properties installed.

Step 1: On the PPA's overview page, look for the heading that reads Adding this PPA to your system. Make a note of the PPA's location, which looks like (for example):

ppa:gwibber-daily/ppa

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 Ubuntu 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, you should 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 Other Repositories

Warning.png There are times when you might want to add non-Ubuntu repositories to your list of repositories. Make sure that all repositories you add in this way 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.

For example, some software cannot be distributed by Ubuntu due to patent and licensing restrictions in some countries (see the RestrictedFormats page for examples). You might want to add repositories that offer such software.

To add additional repositories, click the "Add" button, and enter the location of the repository in the window.

  • SoftwareSources-AddApt2.png

  • Enter the apt line into the dialog box. It should look something like this:
    deb http://ppa.launchpad.net/fta/ubuntu raring main 

info3.png For an explanation of the different parts of the apt line, see the Editing Repositories section below.

idea.png Some web sites provide instructions on how to add their repositories to each version of Ubuntu.

idea.png You can also download an official repository for your machine architecture (i.e. i386) and use it offline (see AptGet/Offline/Repository).

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

  • SoftwareSources-OtherSoftware.png

  • To disable a repository temporarily, untick the checkbox next to the source. The user can restore the repository by selecting it.
  • To remove a software repository ("Channel") permanently from the list, highlight the repository and click on the "Remove" button.

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

info3.png For more on apt and authentication keys, see SecureApt.

Finding a key hash

(Missing section)

Statistics

  • SoftwareSources-Statistics.png

The Statistics tab is provided for those users who wish to provide data anonymously to the Ubuntu project. Information collected and reported include such items as application installation and usage.

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 sources.list. 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 page below. The first, on the left, shows the results of selecting local/main. Local packages are packages stored on the user's computer. The second example, on the right, displays the results of selecting the Ubuntu main online repository.

softwaresources.packages1.png

If you highlight a package and select Properties in the top menu you may be able to determine the repository origin in the Section: area.

properties.png

You can check the information in Section: for repository information. If it is listed, the repository will be listed in parentheses. If there is more than one repository in the sources.list with that ending (for instance nonfree) you will have to look at the Maintainer area to try to determine which specific repository is the source.]

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.

packages.search2.png

Other Links


CategoryPackageManagement

Repositories/Ubuntu (last edited 2015-01-14 11:32:07 by gunnarhj)