LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   /etc/apt/sources.list How to update? (https://www.linuxquestions.org/questions/debian-26/etc-apt-sources-list-how-to-update-754533/)

mrshanim 09-11-2009 09:20 PM

/etc/apt/sources.list How to update?
 
Hi, I am somewhat newbie with unix

Can you please tell me how to update /etc/apt/sources.list ?
I know we can update this with editing sources.list becoming root user but how can we update automatically - like using apt-get/aptitude???

I tried to copy sources.list from other installation but it fails?

Thanks
Shanim
PS I have ethernet connection but for debian 4.0 etch installation stops in the middle if we use network configured. This reason I installed without internet/no network mirror. After installation internet is working fine

rabbit2345 09-11-2009 11:06 PM

If you mean updating like downloading new package information, just run:

Code:

apt-get update
as root


If you mean something else, could you please clarify?

mrshanim 09-12-2009 12:25 AM

No I means to say how to add/update source listing like
deb http://http.us.debian.org/debian main

apt-get update takes links from sources.list but we need to update sources.list

Thanks
shanim

mobinskariya 09-12-2009 12:28 AM

just add that line to sources list(/etc/apt/sources.list) and run
Code:

sudo apt-get update
.. i think adding a source is your problem.

repo 09-12-2009 03:13 AM

Take a look at this thread for some source lists.
http://www.linuxquestions.org/questi...13/page12.html

Just make a backup from your old sources.list
Code:

mv /etc/apt/sources.list /etc/apt/sources.list.old
Then create a new sources.list with the sources you want.
Make sure to use the correct version (debian 4.0 etch)
Then do
Code:

apt-get update
apt-get upgrade


Good luck


All times are GMT -5. The time now is 04:49 PM.