Adding Additional Repositories

By | 2008/01/17

UPDATE: As it has been pointed out in the comments, all of the core repositories are enabled in Ubuntu 7.10. This post will only apply to users still on 6.10 and earlier.

It has been quite some time since I’ve outlined adding and customizing your repository setup on Ubuntu. I figure it’s time for a reminder post, and I’ll show you what I use on my machines.


In order to download and install Ubuntu packages your machine needs to know where to find them. These packages are stored in different locations called repositories, which are organized into a few main groups. The group definitions are as follows:

  • main – supported by canonical, core repository.
  • restricted – supported by canonical, containing non-free software.
  • universe – community supported, strictly free software.
  • multiverse – community supported, containing non-free software.

By default only main and restricted are activated on a new machine. In order to follow many of my tutorials you’ll need the other two activated. (I know I haven’t done a great job of specifying which repository is needed for which package, but I’ll try and improve.)

To activate these you can use the graphical method or the commad line method. Both are pretty easy, I’ll outline each below:

Graphical Repository Configuration

Navigate to “System > Admin > Software Sources” and you’ll be presented with five check-boxes. By default you may only see two of these checked. Check the additional two (universe and multiverse), and you can safely leave the fifth item, source code, unchecked.

Command Line Repository Configuration

The method above is dead-easy, but you may also be working on a server that doesn’t have a GUI installed. In this case you may want to edit the file under-the-hood manually. You can find this file in /etc/apt/sources.list. My file looks like:

deb gutsy main restricted universe multiverse
deb gutsy-updates main restricted universe multiverse
deb gutsy-security main restricted universe multiverse

Each line should begin with deb, so if the browser or wordpress wraps the lines above, it should come to three lines when you edit your file.

By default you’ll have a bunch of other lines, and a lot of commented options. I find that my config should be a safe bet for most users. Note: you also may want to change your repository location, as mine is pointing to the US servers.

It is also common to find suggestions on using third-party repositories for other software. I, and most other members of the support community, HIGHLY avoid this. It can cause problems with current packages, and can cause issues with upgrading. Adding a repository other than the official Ubuntu repositories can limit the level of support you can recieve.

5 thoughts on “Adding Additional Repositories

  1. Wouter

    Since Feisty, all repositories have been enabled by default, so there is no need anymore to do this.

  2. Meneer R

    I just came here from the planet to comment. But then I noticed Wouter beat me to it.

    Please update this post. It might be confusing to people new to ubuntu. It also makes it appear more confusing that it is.

    Since feisty all repositories are enabled by default. However, when installing software from restricted or universe, etc, you get a warning message why it might not be a good idea.

    Which is the better solution. Educational, yet without paying any usability price. Also this message only exists with add/remove.

    Synaptic, which is meant for advanced users, does not bother you with that message.

  3. Christer Edwards Post author

    Thanks for the heads up guys. I’ve updated the post to relay this information. I have always updated my sources.list after installing, just out of habit, so I never noticed this change.

Comments are closed.