How To Configure Apt Sources.List - For Complete Newbies

Submitted by NUNZ (Contact Author) (Forums) on Fri, 2007-08-17 14:23. :: Ubuntu

How To Configure Apt Sources.List - For Complete Newbies

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.

Of course you could always download your new sources.list and ftp, ssh, scp ... it to your box but sometimes an SSH shell from a windows box is what we have to work with.


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.