How to use a sources list generator

I've been trying to install packages using terminal but I keep getting errors and it turns out my sources.list file is really messed up.

So I found this webstite that generates a sources.list file for you

I know my country and my release but I have no idea what other boxes are supposed to be ticked or not because I don't know what they mean.

My overall goal is just to have an up-to-date version of Ubuntu that is able to have Player, Stage and ROS installed on it.


Since what you want is, essentially, simple, the sane thing to do is just revert all your changes instead of using third parties which can be too complicated. Just copy the /usr/share/doc/apt/examples/sources.list file to /etc/apt/ and remove the files in your /etc/apt/sources.list.d directory. Or, in simple commands:

sudo mv /etc/apt/sources.list{,.bk}
sudo mv /etc/apt/sources.list.d{,.bk}
sudo mkdir /etc/apt/sources.list.d
sudo cp /usr/share/doc/apt/examples/sources.list /etc/apt/sources.list
sudo apt-get update

That will restore the original sources.list file, without complications.


The most basic system will just have the:

  • Main

  • Updates

  • Security Updates

repositories, but I recommend following the "normal" route below.


just a working system..

If you just want to get back to a working system then check:

  • Main

  • Restricted

  • Universe

  • Multiverse

  • Security (under the "Ubuntu Updates" section)

  • Updates (under the "Ubuntu Updates" section)

These are the most common repos that people use.

I, personally, would also enable the:

  • Canonical Partner

  • Extras

repositories, but those are entirely optional.

3rd party repos..

If you aren't sure or just want a working system, leave these alone. You won't need them. Otherwise, go ahead and check any software you will want to use. These repositories are good for getting software that isn't in any of the other repos or software newer than those in the repos.

The one exception to this might be the "Oracle Java (JDK) Installer PPA" repository, which is the best (IMO) way to get the Oracle Java JDK on Ubuntu. If you aren't going to develop Java apps or do anything else that requires the Java JDK, then the above applies here: skip it. If you need it later, it isn't hard to get.

Note that you will have to install the software to actually "get" it. This just adds the software to your sources so it is possible to install it.

When you're done, click "Generate List". You'll need to put the generated list in the /etc/apt/sources.list file, replacing anything already present in the file. If you selected any 3rd party repos you will need to add the GPG keys. Follow the directions in the "Getting the GPG keys" box.