Apt sources.list - How to ( STRETCH - OLDSTABLE )

The location /etc/apt/sources.list is an important place to lookout for when you are installing packages in a Debian or debian based distribution.

Here is a sample sources.list which you can directly use

deb http://deb.debian.org/debian stretch main contrib non-free
deb http://deb.debian.org/debian stretch-updates main contrib non-free
deb http://security.debian.org/debian-security/ stretch/updates main
deb http://ftp.debian.org/debian stretch-backports main contrib non-free

Here is an explanation of the above repos line by line

  • stretch - Main stretch release repo
  • stretch-updates - Main stretch updates repo
  • security stretch/updates Security updates for stretch. Note that updates are not provided for contrib and non-free projects.
  • stretch-backports Newer versions of the packages and also packages which came into Debian but didn’t reach Debian stretch release deadline.
1 Like

Why don’t we Download .deb Files Directly from Network and install them by using “dpkg -i filename.deb” which is much better way with no complexity.

Debian uses package management to install packages. When you are installing .deb files directly from internet you are probably breaking the existing package management where one package is dependent on other libraries to function. So if you have observed the package size differences the packages in GNU/Linux are light compared to packages from say Windows because they don’t contain all the libraries.

1 Like

The apt package management does all the job for you finding the required dependencies and getting the appropriate file and also its dependencies. It is actually making your job easier. All you need to do is apt-cache search packagename and download the package which is much easier than going to internet searching for files, downloading packaging and then manually installing it.

Copy pasting from Debian manual

  • The manual configuration by the system administrator is respected. In other words, the package configuration system makes no intrusive configuration for the sake of convenience.

  • Each package comes with its own configuration script with standardized user interface called debconf(7) to help initial installation process of the package.

  • Debian Developers try their best to make your upgrade experience flawless with package configuration scripts.

  • Full functionalities of packaged software are available to the system administrator. But ones with security risks are disabled in the default installation.

  • If you manually activate a service with some security risks, you are responsible for the risk containment.

  • Esoteric configuration may be manually enabled by the system administrator. This may create interference with popular generic helper programs for the system configuration.

apt edit-sources is another way to reach this file.

1 Like