Debian: Consult about "deb-src" in the "/etc/apt/sources.list" file

Hello friends

Consider the following content of the /etc/apt/sources.list file

#deb cdrom:[Debian GNU/Linux 12.8.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20241109-11:05]/ bookworm contrib main non-free-firmware

deb http://deb.debian.org/debian/ bookworm contrib main non-free-firmware non-free
deb-src http://deb.debian.org/debian/ bookworm contrib main non-free-firmware non-free

deb http://security.debian.org/debian-security bookworm-security main non-free-firmware
deb-src http://security.debian.org/debian-security bookworm-security main non-free-firmware

# bookworm-updates, to get updates before a point release is made;
# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
deb http://deb.debian.org/debian/ bookworm-updates main non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm-updates main non-free-firmware

It works perfectly fine

Now, according with some research

One

if is not need it compile software is valid comment (#) all the deb-src lines. Thus any software can be installed through the apt command. Therefore:

apt install <tool>
apt install ./<filename>.deb

A) Correct me if “One” is incorrect

Two

Consider if the /etc/apt/sources.list file shown above is edited to comment all the deb-src lines

Once done that and being curious: I want to know the effect when all the deb-src lines were working:

  1. Is possible know what is the amount of code already downloaded due the deb-src lines?
  2. Where is stored all the content downloaded due the deb-src lines?
  3. How to delete all the content downloaded due the deb-src lines?

Thank You

1 Like

Correct. If you comment them out you have an all binary system

I think not.
If you close the access to the source repos, I imagine your database fairly quickly gets out of date.

I could answer you questions about where source is stored on FreeBSD, but I have never done it in Debian

Unless you specifically downloaded source , there will be none to delete.
The system will always choose the binary with normal apt commands.

1 Like