Ubuntu - Community Help Wiki (original) (raw)

Contents

  1. What are Repositories?
  2. Ubuntu Software Tab
    1. The Four Main Repositories
    2. Download Server
    3. CD-ROM/DVD
  3. Other Software Tab
    1. Enabling Canonical Partner Repositories
    2. CD-ROM/DVD
    3. Adding Personal Package Archives (PPAs)
      1. Adding a PPA using the command-line
    4. Adding Extra Repositories
    5. Editing Repository Details
    6. Removing & Disabling Repositories
  4. Updates Tab
    1. Install updates from:
    2. Automatic Updates
    3. Notify me of a new Ubuntu version:
  5. Authentication Tab
  6. Integration with Ubuntu Software Center
  7. Exploring the Repositories
    1. Finding a Package's Repository
  8. Other Links

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:

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:

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.

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

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.

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:

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!

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 Repository Details section below.

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

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.

SoftwareSources-EditSource.png

The fields are as follows:

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 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:

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.

Authentication Tab

SoftwareSources-Authentication.png

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.

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

Integration with Ubuntu Software Center

UbuntuSoftwareCenter.png

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:

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.

(Note: Some packages are not available from a repository or PPA, instead they are available as Debian packages.)


CategoryPackageManagement