1

Debian security updates are not installed when using commands like apt upgrade or apt dist-upgrade. I also tried with apt-get instead of apt.

However a command like apt upgrade -t stable-security or apt install nodejs -t stable-security will install security updates (for example https://www.debian.org/security/2022/dsa-5170).

Do you know why? This issue happens on my Debian stable laptop but I also have a Debian stable server (VPS) that does not have this issue. I checked that /etc/apt/sources.list file is the same on both installations and there is no /etc/apt/preferences file.

Here are the uncommented lines of /etc/apt/sources.list (based on https://wiki.debian.org/SourcesList#Example_sources.list):

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

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

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

deb http://deb.debian.org/debian bullseye-backports main
deb-src http://deb.debian.org/debian bullseye-backports main

To answer the question from the comments, here is the output of apt policy:

Package files:
 100 /var/lib/dpkg/status
     release a=now
 100 http://deb.debian.org/debian bullseye-backports/main i386 Packages
     release o=Debian Backports,a=bullseye-backports,n=bullseye-backports,l=Debian Backports,c=main,b=i386
     origin deb.debian.org
 100 http://deb.debian.org/debian bullseye-backports/main amd64 Packages
     release o=Debian Backports,a=bullseye-backports,n=bullseye-backports,l=Debian Backports,c=main,b=amd64
     origin deb.debian.org
 500 http://deb.debian.org/debian stable-updates/main i386 Packages
     release v=11-updates,o=Debian,a=stable-updates,n=bullseye-updates,l=Debian,c=main,b=i386
     origin deb.debian.org
 500 http://deb.debian.org/debian stable-updates/main amd64 Packages
     release v=11-updates,o=Debian,a=stable-updates,n=bullseye-updates,l=Debian,c=main,b=amd64
     origin deb.debian.org
 500 http://deb.debian.org/debian-security stable-security/main i386 Packages
     release v=11,o=Debian,a=stable-security,n=bullseye-security,l=Debian-Security,c=main,b=i386
     origin deb.debian.org
 500 http://deb.debian.org/debian-security stable-security/main amd64 Packages
     release v=11,o=Debian,a=stable-security,n=bullseye-security,l=Debian-Security,c=main,b=amd64
     origin deb.debian.org
 990 http://deb.debian.org/debian stable/main i386 Packages
     release v=11.5,o=Debian,a=stable,n=bullseye,l=Debian,c=main,b=i386
     origin deb.debian.org
 990 http://deb.debian.org/debian stable/main amd64 Packages
     release v=11.5,o=Debian,a=stable,n=bullseye,l=Debian,c=main,b=amd64
     origin deb.debian.org
Pinned packages:

Note that previously I also had https://download.virtualbox.org/virtualbox/debian displayed there but I commented it in /etc/apt/sources.list when searching the issue (it did not solve the problem when trying again apt update and apt upgrade).

We can see that the pinning priority of stable is higher than stable-security, which seems to be the issue, do you have an idea why?

0

1 Answer 1

2

A priority of 990 corresponds to the default release; in all likelihood, there’s a configuration entry saying

APT::Default-Release "stable";

or equivalent.

If you remove that, everything should sort itself out.

Alternatively, as mentioned in the Debian 11 release notes, you can keep an `APT::Default-Release" setting, as long as you change it to

APT::Default-Release "/^bullseye(|-security|-updates)$/";

For most scenarios where Default-Release is useful, I find pinning to be more appropriate.

2
  • My comment was removed but it would be useful to keep it for the additional information it contains and in case someone reading has an idea for the question: web.archive.org/web/20221014201920/https://…
    – baptx
    Commented Oct 19, 2022 at 18:18
  • 1
    Security updates are provided separately so that there’s no delay because of mirror propagation (some of the regular Debian mirrors are slow to update). Security updates are merged into the main repositories whenever a point release is made, so users who aren’t tracking the security repository end up getting them anyway. Commented Oct 20, 2022 at 4:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .