Harry Sukumar's Weblog

Share Linux

Posted by hsukumar on 05/12/2007

Configure Apt Sources.List on Ubuntu

So you were playing with your Apt sources.list and somehow ruined it. No matter how hard you try you cannot get it back. Every time you try to install a package you get error messages. Now what?

Don’t despair … I’ve been there and found an easy answer: The Aptitude Source-O-Matic: http://www.ubuntu-nl.org/source-o-matic

All you have to do is go there, fill out three boxes and a new sources.list will be created for you. Here is how to use it.Copy the new sources.list to your clipboard.

Back up your current sources.list, make a new one and start editing.

sudo mv /etc/apt/sources.list /etc/apt/sources.list.old
sudo touch /etc/apt/sources.list
sudo vim /etc/apt/sources.list

Hit i (for insert).

Right click with your mouse button and the contents of your clipboard should appear.

[ESC]wq to save your changes.

Update your sources afterwards:

sudo apt-get update

Hopefully all will now go well.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>