Skip to content

Instantly share code, notes, and snippets.

@hakerdefo
Created June 11, 2023 18:47
Show Gist options
  • Star 66 You must be signed in to star a gist
  • Fork 13 You must be signed in to fork a gist
  • Save hakerdefo/5e1f51fa93ff37871b9ff738b05ba30f to your computer and use it in GitHub Desktop.
Save hakerdefo/5e1f51fa93ff37871b9ff738b05ba30f to your computer and use it in GitHub Desktop.
Debian 12 "bookworm" complete sources.list
deb https://ftp.debian.org/debian/ bookworm contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ bookworm contrib main non-free non-free-firmware
deb https://ftp.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware
deb https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware
deb https://ftp.debian.org/debian/ bookworm-backports contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ bookworm-backports contrib main non-free non-free-firmware
deb https://security.debian.org/debian-security/ bookworm-security contrib main non-free non-free-firmware
# deb-src https://security.debian.org/debian-security/ bookworm-security contrib main non-free non-free-firmware
@hakerdefo
Copy link
Author

hakerdefo commented Jun 11, 2023

Uncomment the deb-src lines to enable source repos.

If you want to use Debian mirrors system backed by Fastly CDN, you can use the following in your sources.list file,

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

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

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

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

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

@superjamie
Copy link

You should use the deb.debian.org Fastly mirror instead of the main FTP site.

It will give better performance almost everywhere and doesn't overwhelm the main project's servers: https://deb.debian.org/

@terminalforlife
Copy link

terminalforlife commented Jun 16, 2023

This didn't work for me at all. This is what I wound up using:

deb http://deb.debian.org/debian bookworm contrib main non-free-firmware
deb http://deb.debian.org/debian bookworm-updates contrib main non-free-firmware
deb http://deb.debian.org/debian bookworm-backports contrib main non-free-firmware
deb http://deb.debian.org/debian-security bookworm-security contrib main non-free-firmware

Note the addition of backports.

I wouldn't worry about HTTPS, as packages are already cryptographically signed. This likely didn't work before because the other addresses didn't seem to exist. Also, 'non-free' was moved over to 'non-free-firmware', apparently.

@gionn
Copy link

gionn commented Jun 16, 2023

some non-free packages has been moved to non-free-firmware, you need both

https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.en.html#non-free-firmware

Here my version for easy copy-paste: https://gist.github.com/gionn/247933393ec0437797efa1fa8d0e8b81

@hakerdefo
Copy link
Author

You should use the deb.debian.org Fastly mirror instead of the main FTP site.

It will give better performance almost everywhere and doesn't overwhelm the main project's servers: https://deb.debian.org/

Yup, it's a good suggestion.

@hakerdefo
Copy link
Author

@terminalforlife

My gist already had the backports repository added. May be you overlooked?

This didn't work for me at all. This is what I wound up using:

Care to share the details about what didn't work?

And, as @gionn mentioned you do need both non-free & non-free-firmware.

@terminalforlife
Copy link

My mistake — I forgot you had backports, although I tried them, too. It was a long night when I posted. 😆

When I had non-free, I got a warning telling me they were moved to non-free-firmware. It might've just been the ones I used, specifically.

On a fresh minimal installation in a VM, no connections could be established to the links provided here, and APT refused to use HTTPS; something about not being able to do it securely. I can't remember the errors. It's a very minimal installation, so it's possible I was missing packages which allowed FTP connections or something. I can access those pages from the host, so that's something. In any case, it's working now, via the entries I posted above.

Once I've got it set up a bit more (when the new VirtualBox 7 stops relentlessly crashing 🙄), I'll give yours a go, again.

@hakerdefo
Copy link
Author

@terminalforlife

A while back, if one wanted to use https with apt, one needed to install the package apt-transport-https. Since version 1.5 of apt, https support has been baked into apt. There is a dummy transitional package apt-transport-https available still. You can try and install it to see whether https links work or not.

@xalt7x
Copy link

xalt7x commented Jun 18, 2023

My Debian 12 installation had only "cdrom" in the sources.list
So I've remove DVD ISO from VM and used "software-properties-gtk"
It generated just a single line for the "main" (without "bookworm-updates" and "bookworm-security")
deb https://deb.debian.org/debian/ bookworm contrib main non-free non-free-firmware

Though as @superjamie mentioned before , "ftp.debian.org" needs to be replaced with "deb.debian.org"

@hakerdefo
Copy link
Author

@superjamie @xalt7x

On popular demand, I've provided the instructions for using Fastly mirrors for Debian,

https://gist.github.com/hakerdefo/5e1f51fa93ff37871b9ff738b05ba30f?permalink_comment_id=4596253#gistcomment-4596253

@TomaszWaszczyk
Copy link

How to add testing packages?

@hakerdefo
Copy link
Author

@TomaszWaszczyk Do you mean repositories for Debian testing (trixie)?

@TomaszWaszczyk
Copy link

I mean this example from Debian 11:

deb http://deb.debian.org/debian **unstable** main contrib non-free
deb-src http://deb.debian.org/debian **unstable** main contrib non-free

@hakerdefo
Copy link
Author

@TomaszWaszczyk
That repository is for Debian Unstable aka Debian Sid. Debian 11 (Bullseye) is now oldstable. What Debian version are you using?

@TomaszWaszczyk
Copy link

I look for unstable repositories for Debian 12, thanks for interaction, by the way. ;-)

@hakerdefo
Copy link
Author

@TomaszWaszczyk

Adding Sid repo to your Debian 12 system could result in a broken system but if you are willing to take risk, then you'll need to master the art of Apt-Pinning,

https://jaqque.sbih.org/kplug/apt-pinning.html

Good luck 🤞

@TomaszWaszczyk
Copy link

Packages in testing requires just more attention and thinking what somebody installs. Thanks for the link!

@alindberg
Copy link

If you don't want to use release names try the following (my sources.list)

# as of 2023-06-21
# oldoldoldstable == Stretch (v9)
# oldoldstable == Buster (v10)
# oldstable == Bullsey (v11)
# stable == Bookworm (v12) (2023-06-10)
# testing ==  (v13)- aka Trxie
# unstable == (v14) - aka Forky
#
# See http://wiki.debian.org/DebianReleases
#

deb http://deb.debian.org/debian/ stable main non-free non-free-firmware contrib
deb-src http://deb.debian.org/debian/ stable main non-free non-free-firmware contrib

deb http://deb.debian.org/debian/ testing main non-free non-free-firmware contrib
deb-src http://deb.debian.org/debian/ testing main non-free non-free-firmware contrib

deb http://deb.debian.org/debian-security stable-security main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian-security stable-security main contrib non-free non-free-firmware

@FrogCF
Copy link

FrogCF commented Jul 15, 2023

Stable Version

Don't forget to say thank you!

deb http://deb.debian.org/debian bookworm main
deb-src http://deb.debian.org/debian bookworm main

deb http://deb.debian.org/debian-security/ bookworm-security main
deb-src http://deb.debian.org/debian-security/ bookworm-security main

deb http://deb.debian.org/debian bookworm-updates main
deb-src http://deb.debian.org/debian bookworm-updates main

@Etrusco0022
Copy link

I have a problem, Debian 12 bookworm recently, neofetch screen Packages: 4105 (dpkg), 5 (flatpak) excessive.
Kernel 5.10.0-19-amd64
I guess that translates to not suitable.

Any suggestions without hammers..

thank you so much

@thexeromin
Copy link

kworm-security main deb-src http://deb.debian.org/debian-security/ bookworm-security main

deb http://deb.debian.org/debian bookworm-updates main deb-src http://deb.debian.org/debian bookworm-updates main

What about bookworm-proposed-updates and bookworm-backports? Is these are stable?

@hakerdefo
Copy link
Author

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

What about bookworm-proposed-updates and bookworm-backports? Is these are stable?

Hi there Abhi,

My gist has those already included. Yes, they should mostly be stable and are safe to include as sources.

@melroy89
Copy link

melroy89 commented Jan 24, 2024

You should use the deb.debian.org Fastly mirror instead of the main FTP site.

It will give better performance almost everywhere and doesn't overwhelm the main project's servers: https://deb.debian.org/

This is true. @hakerdefo can you update your snippet to not overwhelm the debian servers and let users use the Fastly CDN instead. Which is often also faster.

@Braste
Copy link

Braste commented Jan 28, 2024

You should use the deb.debian.org Fastly mirror instead of the main FTP site.
It will give better performance almost everywhere and doesn't overwhelm the main project's servers: https://deb.debian.org/

This is true. @hakerdefo can you update your snippet to not overwhelm the debian servers and let users use the Fastly CDN instead. Which is often also faster.

This? https://gist.github.com/hakerdefo/5e1f51fa93ff37871b9ff738b05ba30f?permalink_comment_id=4596253#gistcomment-4596253

@melroy89
Copy link

@Braste Yes. That comment. Just use http://deb.debian.org which is backed by Fastly CDN nowadays, you do not need to use the FTP domains anymore. The ftp sub-domain used to be faster, but that is not anymore the case. I would stick with the deb.debian.org domain(s).

@spoonerarthur
Copy link

spoonerarthur commented Feb 24, 2024

Hi at All,
it is the first time a install Debian 12 and I am desperate.
I can not install any package.
I edit the sources.list

# Debian Main Repositories
deb http://deb.debian.org/debian/ bookworm main contrib non-free
deb-src http://deb.debian.org/debian/ bookworm main contrib non-free
 
# Debian Security Updates
deb http://security.debian.org/debian-security bookworm-security main contrib non-free
deb-src http://security.debian.org/debian-security bookworm-security main contrib non-free
 
# Debian Updates
deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free
deb-src http://deb.debian.org/debian/ bookworm-updates main contrib non-free

but it doesn't work.

I am in the sudores group
I have internet connection
I can search for some packages, like networkmanager
But I do not find teamviewer or anydesk for example.

Can you help me, please.

Regards Arthur

@melroy89
Copy link

@spoonerarthur Please use markdown code blocks if you want to post sources.list content or any content or code for that matter.

@Braste
Copy link

Braste commented Feb 29, 2024

Hi at All, it is the first time a install Debian 12 and I am desperate. I can not install any package. I edit the sources.list

# Debian Main Repositories
deb http://deb.debian.org/debian/ bookworm main contrib non-free
deb-src http://deb.debian.org/debian/ bookworm main contrib non-free
 
# Debian Security Updates
deb http://security.debian.org/debian-security bookworm-security main contrib non-free
deb-src http://security.debian.org/debian-security bookworm-security main contrib non-free
 
# Debian Updates
deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free
deb-src http://deb.debian.org/debian/ bookworm-updates main contrib non-free

but it doesn't work.

I am in the sudores group I have internet connection I can search for some packages, like networkmanager But I do not find teamviewer or anydesk for example.

Can you help me, please.

Regards Arthur

Neither teamviewer nor anydesk are available in the standard debian repositories. You said, that you find networkmanager, so I assume that you are able to install packages in general, just not every package you want? Please clarify.

@spoonerarthur
Copy link

Hi Stefan,
I am a absolute Newbie.
Yes, your right, everything works correct.
I download teamviewer, then a install policykit-1 and then teamviewer over the terminal.

I thought in the desktop environment software like teamviewer or anydesk would be installable.

Regards Arthur

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment