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

161

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 http://security.debian.org/debian-security buster/updates main contrib
deb-src http://security.debian.org/debian-security 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 http://deb.debian.org/debian/ buster-updates main contrib
# deb-src http://deb.debian.org/debian/ 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 http://deb.debian.org/debian buster main
deb-src http://deb.debian.org/debian buster main

deb http://deb.debian.org/debian-security/ buster/updates main
deb-src http://deb.debian.org/debian-security/ buster/updates main

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

Debian 10: Backports

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

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

Update

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

sudo apt update

Conclusion

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

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More