Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debian: understanding /etc/apt/sources.list

Tags:

linux

debian

I'm pretty new in Debian world. I just got a private virtual server to host my websites, and i'm currently learning how to correctly secure a webserver.

If I understand well, when doing apt-get update && apt-get upgrade, apt will retrieve updates of my installed packages in the repositories listed in /etc/apt/sources.list. My sources.list looks like this :

deb http://http.debian.net/debian wheezy main
deb-src http://http.debian.net/debian wheezy main

deb http://http.debian.net/debian wheezy-updates main
deb-src http://http.debian.net/debian wheezy-updates main

deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main

And here come my questions :)

  1. Can I remove the lines starting with "deb-src"? Am I correct if I say I don't need packages sources unless I want to modify them myself (which, obviously, i'm just not able to do)?

  2. What's the point of having several repositories (http://http.debian.net/debian and http://security.debian.org/)? I keep reading documentations about apt, but I don't find any explanations. Are there any packages that are in security.debian.org that are not in http.debian.net/debian? And vice versa?

  3. after the repository URI comes the component. I understand the differences between wheezy / stable / testing etc. But what's the differences between wheezy and wheezy/updates?

Thanks!

like image 490
PGBI Avatar asked Aug 31 '25 18:08

PGBI


1 Answers

deb-src is for source packages. You would use those for cross compiling and other neat dev stuff.

The security repo is where the security related updates are stored.

Lastly the updates repo is for updates released after the distribution is live, I believe.

Take a look at https://wiki.debian.org/SourcesList

And this SE question https://unix.stackexchange.com/questions/4255/why-is-there-a-separate-package-repository-for-debian-security-updates

like image 200
MeetTitan Avatar answered Sep 03 '25 06:09

MeetTitan