What non-free and contrib packages are in Debian repositories?
To answer this question, it is important to introduce you to the Debian Free Software Guidelines (DFSG), a project used to decide if a package is suitable to be included as part of Debian main repositories.
Despite encouraging free software use, Debian provides infrastructure to manage non-free software, including all software which doesn’t meet the DFSG guidelines, this software is classified or flagged as non-free.
Software meeting DFSG requirements, but depending on non-free software in repositories is classified as contrib. Packages flagged as contrib include packages depending on non-free software, or packages depending on contrib packages. Therefore, we have 3 types of repositories:
main: All software meeting DFSG requirements.
non-free: Software which does not meet DFSG requirements and is not part of Debian.
contrib: Software meeting DFSG requirements but depending on non-free packages or packages depending on non-free packages (Other contrib packages).
Enabling Non-Free and Contrib Packages on Debian 11 (Bullseye)
To begin, you need to edit the repositories configuration file /etc/apt/sources.list. You can do it using nano as shown in the following example. Remember to use the sudo prefix or run nano as root.
The repositories file should contain the following official repositories.
To begin, comment the existing lines by adding a # symbol before each line. Then copy and paste the following lines within the /etc/apt/sources.list file as shown in the following screenshot.
deb-src http://deb.debian.org/debian bullseye main contrib non-free
deb http://deb.debian.org/debian-security bullseye/updates main contrib non-free
deb-src http://deb.debian.org/debian-security bullseye/updates 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
Now, the configuration file /etc/apt/sources.list must seem like the screenshot above. Close nano saving changes (Press Ctrl+X) to continue.
Once edited the configuration file, you need to update your repositories. You can get it done by running the apt command followed by the update option as shown in the screenshot below.
Alternatively, you also can update your repositories using aptitude instead of apt as shown below.
Now, non-free and contrib packages are enabled for you to install from repositories.
Some Alternative Repository Mirrors by Country
Canada server:
deb-src http://ftp.ca.debian.org/debian/ bullseye main contrib non-free
Chile server:
deb-src http://ftp.cl.debian.org/debian/ bullseye main contrib non-free
Denmark server:
deb-src http://ftp.dk.debian.org/debian/ bullseye main contrib non-free
Finland server:
deb-src http://ftp.fi.debian.org/debian/ bullseye main contrib non-free
France mirror:
deb-src http://ftp.fr.debian.org/debian/ bullseye main contrib non-free
Germany mirror:
deb-src http://ftp.de.debian.org/debian/ bullseye main contrib non-free
UK server:
deb-src http://ftp.uk.debian.org/debian/ bullseye main contrib non-free
Hong Kong server:
deb-src http://ftp.hk.debian.org/debian/ bullseye main contrib non-free
Italy server:
deb-src http://ftp.it.debian.org/debian/ bullseye main contrib non-free
Japan mirror:
deb-src http://ftp.jp.debian.org/debian/ bullseye main contrib non-free
Mexico mirror:
deb-src http://ftp.mx.debian.org/debian/ bullseye main contrib non-free
Russia mirror:
deb-src http://ftp.ru.debian.org/debian/ bullseye main contrib non-free
Spain mirror:
deb-src http://ftp.es.debian.org/debian/ bullseye main contrib non-free
Sweden mirror:
deb-src http://ftp.se.debian.org/debian/ bullseye main contrib non-free
Taiwan mirror:
deb-src http://ftp.tw.debian.org/debian/ bullseye main contrib non-free
United States:
deb-src http://ftp.us.debian.org/debian/ bullseye main contrib non-free
Conclusion
As you can see, enabling non-free and contrib packages on Debian 11 repositories is pretty simple. Due to security concerns, it isn’t recommended to enable non-free and contrib repositories unless necessary. Enabling non-free repositories is usually required for special firmware or drivers, or to deal with proprietary software. Keep in mind adding a proper repository according to your geographical location may impact your download speed. In some cases, you opt for downloading the non-free software you need from the web before enabling non-free or contrib packages in your system.
Thank you for reading this tutorial explaining how to enable non-free packages on Debian 11 repositories. Keep following us for additional Linux tips and tutorials.