Add Debian 11 Bullseye official repositories to sources.list

Posted on 169 views

After the installation of Debian 11 Bullseye on a Virtualized Infrastructure or a physical machine you’ll notice APT repositories are not configured correctly. These issue doesn’t apply to Cloud images which have repositories for Debian 11 (Bullseye) configured correctly. In this guide we will show you how to add Debian 11 Bullseye Official repositories to sources.list.

If you attempt APT repository update you’ll get an error as shown in the screenshot.


The remedy to this problem is correctly updating sources.list file with Debian 11 (Bullseye) default update and security repositories.

Current file contents:

$ cat /etc/apt/sources.list
# deb cdrom:[Debian GNU/Linux 11.0.0 _Bullseye_ - Official amd64 DVD Binary-1 20210814-10:04]/ bullseye contrib main

deb cdrom:[Debian GNU/Linux 11.0.0 _Bullseye_ - Official amd64 DVD Binary-1 20210814-10:04]/ bullseye contrib main

deb bullseye-security main contrib
deb-src bullseye-security main contrib

# bullseye-updates, to get updates before a point release is made;
# see
# A network mirror was not selected during install.  The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
# deb bullseye-updates main contrib
# deb-src bullseye-updates main contrib

Add Debian 11 Bullseye Official repositories to sources.list

Run the commands below to add Debian 11 Bullseye Official repositories to sources.list

sudo tee /etc/apt/sources.list<
deb bullseye main
deb-src bullseye main

deb bullseye-security main
deb-src bullseye-security main

deb bullseye-updates main
deb-src bullseye-updates main

deb bullseye-backports main
deb-src bullseye-backports main

When done, update your APT index to confirm the repositories are working correctly:

$ sudo apt update
Get:1 bullseye InRelease [113 kB]
Get:2 bullseye-security InRelease [44.1 kB]
Get:3 bullseye-updates InRelease [36.8 kB]
Get:4 bullseye-backports InRelease [40.9 kB]
Get:5 bullseye-security/main Sources [15.8 kB]
Get:6 bullseye-security/main amd64 Packages [31.1 kB]
Get:7 bullseye-security/main Translation-en [16.8 kB]
Get:8 bullseye/main Sources [8612 kB]
Get:9 bullseye/main amd64 Packages [8178 kB]
Get:10 bullseye/main Translation-en [6241 kB]
Get:11 bullseye-backports/main Sources [49.8 kB]
Get:12 bullseye-backports/main amd64 Packages [68.7 kB]
Get:13 bullseye-backports/main Translation-en [50.5 kB]
Fetched 23.5 MB in 5s (4978 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.

Update System

With the official OS repositories added and confirmed to be working let’s update the system packages:

sudo apt upgrade

You can also try distribution minor upgrades if available

sudo apt dist-upgrade

Also install common OS administration tools

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

You now have correct sources.list file on your Debian 11 (Bullseye( system.


Gravatar Image
A systems engineer with excellent skills in systems administration, cloud computing, systems deployment, virtualization, containers, and a certified ethical hacker.