Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Sometimes I see sites offering Ubuntu packages via something like

Add this line to your software sources: deb http:// something something

How can I add these to my package manager so I can install the software and keep it up to date? I'd like both GUI and command line options.

share|improve this question

3 Answers 3

up vote 11 down vote accepted

You can easily add them in the Software Center->Edit->Software Sources->Other Sources->Add"

  1. Start the Software Center.

  2. In the panel go to Edit and select Software Sources.

    edit-software-sources

  3. In the tab Other Sources click on the Add button at the bottom.

    other-sources

  4. Add the deb URL in the APT Line input field and hit Add Source.

    software-properties-gtk

Once you close the Software Sources window your cache is going to be updated automatically.

You can now browse the newly added source in the New Source sub-list using the upper left list in Get Software.

share|improve this answer

Here is another version.

gksudo gedit /etc/apt/sources.list

Add the deb URL to bottom of file and save it. After that you have to update the apt cache with

sudo apt-get update

Now you can install software from that source just like from any other source using

sudo apt-get install [packagename]
share|improve this answer

From the command line we may add software sources by

sudo add-apt-repository deb http://something something

This will add the given source to our sources.list. We may need to additionally import a signature key:

sudo apt-key add <downloaded-keyfile>

There is a short form for a ppa:

sudo add-apt-repository ppa:<lp-user>/<ppa-name>

that will expand the entries for the sources list and automatically imports the gpg key.


After having added a new source we need to update the package index files in any case by running

sudo apt-get update
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.