On 2020-07-01 at 07:22, gru...@mailfence.com wrote:

> i build my kernels
> how can i tell apt to never install a kernel when i upgrade

There are probably other ways, but my first stab at it would be to just
remove all the installed kernel packages.

Something like

$ apt-get remove $(dpkg -l linux-{image,headers,doc}* | grep ii | cut -d
' ' -f 3 )

will remove all linux-image packages (which contain the actual kernels),
linux-headers packages (which contain the installed kernel headers, for
compiling programs that need to talk to that version of the kernel), and
linux-doc packages (which contain reference documentation for that
version of the kernel). A --dry-run version of this doesn't seem to want
to remove anything else, on my system. Adjust the set of package types
to be dropped as you see fit.

(Note that this is a bit dangerous, unless you're 100% certain that
nothing in your running system is making use of files installed by one
of these packages. Even if it does break things, they're 100% fixable as
long as you have suitable recovery media to boot from, but proceed with
this at your own risk.)

There's also the linux-base package, but that seems to contain only
scripts and so forth for working with kernel images; at a glance I don't
think that's likely to contain anything you'll find problematic, and
there are other packages (such as initramfs-tools) which depend on it
and which you may want to retain.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to