Debian – Debian 9 Sources.list Configuration Guide

debiansoftware-updates

I have installed Debian 9 Stretch stable version today.

I want to update my system. But I didn't find package list for sources.list. In the site, I found Debian 9 sources.list package. But this list for Debian 9 Testing. Can I use it for stable Debian 9? or where is Debian 9 sources.list?

How can I update my system?

Debian 9 was released yesterday. Do I need to update the system?

Best Answer

The sources.list for Debian Testing is not compatible with Debian 9 (codename Stretch)

Here is an example sources.list:

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

The following sources.list attempts to serve content close to your location using redirection:

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://deb.debian.org/debian-security/ stretch/updates main contrib non-free

To update your system, proceed as usual:

apt-get update # Update package information from sources
apt-get upgrade # Upgrade packages
apt-get dist-upgrade # Upgrade packages that depends on new dependencies

I do recommend doing security updates either manually or doing it as part of planned upgrades via other provisioning systems, after testing in a pre-production environment. In alternative, you might also install the package unattended-upgrades.

You can read more information here

Related Question