Re: apt upgrade
On Fri 21 Nov 2025 at 15:00:39 (-0500), Jeffrey Walton wrote:
> On Fri, Nov 21, 2025 at 2:10 PM mick.crane <mick.crane@gmail.com> wrote:
> >
> > updating and upgrading Trixie with apt there was a message about can't
> > find the headers not installing modules. Reboot and X won't start with
> > the new kernel. Installing the headers and re-installing the kernel
> > installed the modules,likely for nvidia-driver, and seems to have solved
> > the issue.
> > Is there an apt line that says install the headers if going to need them
> > or are you supposed to check which kernel might be installed and get the
> > headers before upgrading?
>
> As Šarūnas said, the two packages of interest on Debian are
> linux-image-amd64 and linux-headers-amd64. I even go so fars as to
> apt-mark them as automatic:
>
> apt-get install -y linux-image-amd64 linux-headers-amd64
> apt-mark auto linux-image-amd64 linux-headers-amd64
Hmm. My reading of APT's autoremove is that marking these packages
as auto makes them /more/ vulnerable to autoremoval, not less.
According to the docs:
"Packages which you have installed explicitly via install
are also never proposed for automatic removal."
Cheers,
David.
Reply to: