On Tuesday 25 July 2017 10:02:50 Greg Wooledge wrote:

> Is there any way to permanently neuter apt-get autoremove, so that
> even if something invokes it against my will, it will *never* remove
> anything?
>
> And more, is there a way to get apt and apt-get to *stop* prompting me
> to run it, and *stop* spamming me with a list of packages that it
> would like me to remove?  (Maybe that's the same as the first
> question, maybe not.)
>
> My strategy so far has been "ignore the spam, and never willingly run
> autoremove".  This mostly works, but I recently learned that tasksel
> will apparently run an autoremove, without warning, whether I want it
> to or not (<http://bugs.debian.org/868892>).
>
> If autoremove will also remove *kernels*, which this thread seems to
> indicate is the case, then my concerns just went up another notch.
>
In that event, see man apt and find the "pin" instructions.

I recently had a rt kernel wiped on a raspi, which kills linuxcnc.

I pulled the sd card in here, and replaced the missing kernel, then 
following the pin instructions, and then watching the --upgradable 
listings, added 2 more stanza's to a file in /etc/apt/preferences.d, 
named kernel.pref, so it looks like this:
  
pi@picncsheldon:~/linuxcnc/configs/sheldon-lathe $ 
cat /etc/apt/preferences.d/kernel.pref 
============================
Package:linux-kernel
pin: version 4.4.4-rt9-v7+
Pin-Priority: 1001

Package: linux-headers
Pin: version 4.4.4-rt9-v7+
Pin-Priority: 1001

Package: raspberrypi-bootloader
Pin: version 1.20170427-1
Pin-Priority: 1001

Package: raspberrypi-kernel
Pin: version 1.20170427-1
Pin-Priority: 1001
============================
pi@picncsheldon:~/linuxcnc/configs/sheldon-lathe $ 

I know, that is an older rt kernel, but the performance of the newer ones 
is horrifying, missing keyboard events to the point of completely 
unusable.

> I suppose one could manually mark each and every single installed
> package as "manually installed", but you'd have to remember to repeat
> this periodically, and it seems clumsy and inelegant compared to some
> sort of master switch that can just tell autoremove to go die in a
> fire.


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>

Reply via email to