Setup Debian 10 Official Repository In sources.list (/etc/apt/sources.list)


When you install Debian 10 using a DVD, the Debian OS installer sets the DVD as a source for getting packages for your system if you didn’t choose to scan for network mirrors. We need to update sources.list file in order to get packages from the internet.

The /etc/apt/sources.list file with DVD as a source would look something like below.

# deb cdrom:[Debian GNU/Linux 10.6.0 _Buster_ - Official amd64 DVD Binary-1 20200926-10:17]/ buster contrib main
deb cdrom:[Debian GNU/Linux 10.6.0 _Buster_ - Official amd64 DVD Binary-1 20200926-10:17]/ buster contrib main
deb buster/updates main contrib
deb-src buster/updates main contrib
# buster-updates, previously known as 'volatile'
# 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 buster-updates main contrib
# deb-src buster-updates main contrib

The system would ask you to insert a DVD when installing some packages on your system if the disc is not present in the DVD driver.

Media change: please insert the disc labeled
 'Debian GNU/Linux 10.6.0 _Buster_ - Official amd64 DVD Binary-1 20200926-10:17'
in the drive '/media/cdrom/' and press [Enter]

Debian 10: Official sources.list

To set up a Debian 10 official repository on your system, add/update /etc/apt/sources.list file with the below details.

deb buster main
deb-src buster main
deb buster/updates main
deb-src buster/updates main
deb buster-updates main
deb-src buster-updates main

Debian 10: Contrib & Non-Free

If you want to get contrib and non-free components for your system, use the below one.

deb buster main contrib non-free
deb-src buster main contrib non-free
deb buster/updates main contrib non-free
deb-src buster/updates main contrib non-free
deb buster-updates main contrib non-free
deb-src buster-updates main contrib non-free

Debian 10: Backports

In case you want to add Backports, update the sources.list with the below information.

deb buster-backports main contrib non-free
deb-src buster-backports main contrib non-free


Once you have added the required repositories, update the index.

sudo apt update


That’s All. I hope this post helped you add the required repositories on your Debian 10 system.

You might also like