How To

Configure Official repositories to sources.list on Debian 12/11/10

After installation of Debian from DVD, my system couldn’t be updated or any package installed as the sources.list was referring to DVD mount store as packages repository. I had to manually update sources.list file with the correct list of URLs where packages can be downloaded from and security updates location.

Original content from computingforgeeks.com - post 20217
debian 10

In this guide, we will see how you can add Official Debian 10 apt repositories to the sources.list file.

For Debian 11 refer to guide in the link below:

Update your OS repositories list by using the following commands:

Debian 12:

tee /etc/apt/sources.list<<EOF
deb http://deb.debian.org/debian bookworm main contrib non-free-firmware
# deb-src http://deb.debian.org/debian bookworm main contrib non-free-firmware

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

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

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

Debian 11:

tee /etc/apt/sources.list<<EOF
deb http://deb.debian.org/debian bullseye main contrib non-free
# deb-src http://deb.debian.org/debian bullseye main contrib non-free

deb http://deb.debian.org/debian bullseye-updates main contrib non-free
# deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free

# deb http://deb.debian.org/debian bullseye-backports main contrib non-free
# deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free

deb http://security.debian.org/debian-security bullseye-security main contrib non-free
# deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free
EOF

Debian 10:

tee /etc/apt/sources.list<<EOF
deb http://deb.debian.org/debian buster main contrib non-free
# deb-src http://deb.debian.org/debian buster main contrib non-free

deb http://deb.debian.org/debian buster-updates main contrib non-free
# deb-src http://deb.debian.org/debian buster-updates main contrib non-free

# deb http://deb.debian.org/debian buster-backports main contrib non-free
# deb-src http://deb.debian.org/debian buster-backports main contrib non-free

deb http://security.debian.org/debian-security buster-security main contrib non-free
# deb-src http://security.debian.org/debian-security buster-security main contrib non-free
EOF

Example screenshot for Debian 10.

debian 10 repositories

When done, update your APT index.

$ sudo apt update
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Hit:2 http://deb.debian.org/debian buster InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
63 packages can be upgraded. Run 'apt list --upgradable' to see them.

Upgrade your system packages.

sudo apt upgrade -y

Try install other packages, e.g my compulsory list comprises of:

sudo apt install bash-completion wget curl vim telnet -y

You now have correct sources.list file on your Debian 10 system. Install your favorite work tools to best delivery.

Related Articles

Containers Install Minikube Kubernetes on Debian 12 (Bookworm) Databases How To Install MariaDB 10.6 on Debian 12/11/10 Debian Debian 13 (Trixie) – New Features and Complete Installation Guide Debian Configure Rsyslog Centralized Log Server on Ubuntu 22.04|20.04|18.04

Press ESC to close