** Changed in: apt (Debian)
Status: Unknown => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1440608
Title:
/etc/kernel/postinst.d/apt-auto-removal wants
Autoremoval issues for Trusty were solved in Bug #1429041
** Tags removed: trusty utopic
** Changed in: apt (Ubuntu)
Importance: High => Medium
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
** No longer affects: linux (Ubuntu)
** Bug watch added: Debian Bug tracker #787827
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=787827
** Also affects: apt (Debian) via
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=787827
Importance: Unknown
Status: Unknown
--
You
Upstream commit:
https://anonscm.debian.org/cgit/apt/apt.git/commit/debian/apt.auto-
removal.sh?id=3196dae8e92407b3aa8e12779a8ed7db998ebdc4
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
Seems to be fixed in Xenial (apt 1.2.10ubuntu1); at least two kernels
are always kept, if available.
** Changed in: apt (Ubuntu)
Status: Triaged => Fix Released
** Changed in: hundredpapercuts
Status: Triaged => Fix Released
--
You received this bug notification because you are a
This is working as it should work now. Is there any timeline on when it will be
put out to the masses?
I install a kernel and before rebooting I purge the 3rd kernel back like I've
always done.
If you autoremove the kernel it leaves the residual config files, which have to
purged with a command
Today when updating via cli 4.4.0-2-generic kernel was waiting to be
autoremoved. So after getting the updates I autoremoved that kernel.
This left me with 2 kernels 4.4.0-4-generic and 4.4.0-6-generic which is
precisely how it is supposed to work.
I think this is working great now.
--
You
I let 3 kernels remain on my Xubuntu 16.04 pc: 4.3.0-7-generic, 4.4.0-2-generic
and 4.4.0-4-generic. Just to see what would happen.
Today when 4.4.0-6-generic kernel came through in regular updates and
when it installed and I rebooted.
I again checked for updates via cli and it wanted to
The installation of the 4.4.0-2-generic in Xenial 16.04 went well, It
left 3 kernels in 01autoremove-kernels so I manually purged the 3rd
oldest one. Now there are 2 there. I updated my /etc/kernel/postinst.d
/apt-auto-removal with version 5 above.
--
You received this bug notification because
Simplify the script by using grep instead of awk in one check. During
removal, the kernel package is apparently in half-installed state (H),
so check for that (although [^c]} should work, too).
** Attachment added: "/etc/kernel/postinst.d/apt-auto-removal (version 5 from
Jarno Suni)"
As for #46, you could have ran `sudo /etc/kernel/postinst.d/apt-auto-
removal ; sudo apt-get autoremove --purge` after reboot. I don't know,
if you can configure unattended upgrade to do purging, as well.
As for #47, it is the matter of Bug #1458204
--
You received this bug notification because
Got the 4.3.0-7-generic kernel on Xubuntu 16.04 in today's updates and the
01autoremove-kernels file
contains the last 3 kernels, which I'm fine with. I'll purge the 3rd oldest
one. I prefer purging them
manually instead of using autoremove because autoremove leaves the "Residual
Config"
Manually purged the 4.3.0-5-generic kernel and that left the
4.3.0-6-generic and 4.3.0-7-generic kernels in the 01autoremove-kernels
file. Which is great.
My only question is why does it require a reboot when the 3rd oldest
kernel is deleted? I don't think this should be happening either.
--
In contrary to what I told in #40, there is no fear that autoremove
would remove the latest kernel that some meta package depends on.
(Though the possibility is there, if there is no manually installed meta
package that recursively depends on the kernel.) So "xargs apt-mark
showauto" is not
Jarno, I did notice that those commands were in the original script after I
posted that.
I got the 4.3.0-6-generic installed in Xubuntu 16.04 just a while ago and your
script worked flawlessly.
I had 3 kernels: 4.3.0-2-generic, 4.3.0-5-generic and 4.3.0-6-generic after
installation and the
Then I performed a sudo apt autoremove and the 4.3.0-2-generic was removed.
The 01autoremove-kernels did not change and still contains the last 2 kernels,
which is good.
The output is attached.
It gave an erroneous error about the kernel header for 4.3.0-2-generic
not being found but since it
This seems to work for me. I changed some things based on feedback from
Robert Euhus (and a little bit more). I don't see a problem in updating
the kernel list in case a linux-image-extra package is being removed;
the list does not change then, but this updates also, when a linux-image
package is
** Attachment removed: "Fixed again /etc/kernel/postinst.d/apt-auto-removal
script"
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1440608/+attachment/4551164/+files/apt-auto-removal
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is
Cavsfan, the comment was copied from the original script; it may not be
accurate with this one. I think the normal case after installing a
kernel with this script is three kernels in the never-auto-remove list.
There may probably be four kernels installed then (before autoremoving).
If that is too
Oh, now I remember why I added "xargs apt-mark showauto" in the pipe in
the first script attached to comment #22: if you manually add some newer
kernels for e.g. testing something, you may not want system to
automatically remove the latest kernels available from the usual Ubuntu
repository, and
Thanks for the attention to this issue that effects every debian version
including Mint back to Trusty 14.04.
I copied your version 4 script into my /etc/kernel/postinst.d/apt-auto-removal.
I will post the entire output resulting from the next kernel that gets added.
I have a 64 bit version of
** Changed in: linux (Ubuntu)
Status: Triaged => Invalid
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1440608
Title:
/etc/kernel/postinst.d/apt-auto-removal wants to
Jarno Suni, thanks for the reply.
First I would like to stress, that I still don't think that running all
the KERNELS postINSTALL hooks while REMOVING the -extra package is the
right thing todo. The only thing I can see that is really needed is the
recreation of the initrd on installation and
Hi all,
sorry, the apt-auto-removal script attached above contained some debug
echo statements. Which were harmless, but unnessecary.
Testing and thinking a bit more about the problem I have come to the
conclusion, that upon removal of a linux-image-extra package the only
right thing to do is
** Changed in: linux (Ubuntu)
Status: Confirmed => Triaged
** Changed in: apt (Ubuntu)
Status: Confirmed => Triaged
** Changed in: hundredpapercuts
Status: Confirmed => Triaged
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages,
Robert Euhus, as for #36,
-Strange, no such broken pipe error due to missing backslash-escape occured,
when I tried the script I uploaded.
- You are correct, the awk regex for creating the "list" needs one more space,
because the abbreviated status of a package seems to contain three characters,
Robert Euhus, even if the kernel-to-be-removed is added to the never-
autoremove list by /etc/kernel/postinst.d/apt-auto-removal when removing
the linux-image-extra package by apt-get autoremove, the respective
linux-image package will be removed successfully thereafter. But it does
not work, if
The attached script now tries to detect, whether it is called in
conjunction with kernel installation or in conjunction with kernel
removal. It uses dpkg-query for that. Maybe it could be done more
easilly by giving the information to the script as a command-line
argument by apt-get? The script
** Package changed: linux-meta (Ubuntu) => linux (Ubuntu)
** Changed in: linux (Ubuntu)
Status: New => Confirmed
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1440608
Status changed to 'Confirmed' because the bug affects multiple users.
** Changed in: linux (Ubuntu)
Status: New => Confirmed
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
The problem is that on purge/removal the linux-image-extra package runs
all the kernel post-*install*-hooks in /etc/kernel/postinst.d (as its
postrm hook), including the /etc/kernel/postinst.d/apt-auto-removal
hook. The 'to-be-removed'-version of the kernel is given as an argument
and thereby
** Also affects: linux-meta (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1440608
Title:
** Changed in: linux (Ubuntu)
Importance: Undecided => High
** Also affects: hundredpapercuts
Importance: Undecided
Status: New
** Changed in: hundredpapercuts
Status: New => Confirmed
** Changed in: hundredpapercuts
Importance: Undecided => High
--
You received this
Cavsfan, I had similar error during removal of a linux.image-extra
package: you can see it in the log I added to
http://askubuntu.com/q/718966/21005 Maybe removing the kernel package
before header packages would have resulted no such an error. BTW, I
think you cut the output so that it does not
Jarnos, I have always had a text file with the kernels listed on it and when I
have 3 I delete the 3rd one leaving me 2.
This has been good since 2009. Since it wasn't asking me to autoremove anything
I just entered:
sudo apt-get purge linux-headers-4.3.0-1 linux-headers-4.3.0-1-generic
cavsfan, why didn't you just use "sudo apt-get autoremove --purge" to
purge the extra kernel? Anyway, it is odd that the system required
image packages to be removed before header packages.
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is
Jarnos, I can confirm that your /etc/kernel/postinst.d/apt-auto-removal and
adding the cron job resolves this problem.
I installed the 4.3.0-5-generic kernel and rebooted and then manually purged
the 4.3.0-1-generic and it gave some erroneous errors about not being able to
find the DKMS
To make sure current kernel is not autoremoved, /etc/kernel/postinst.d
/apt-auto-removal should be run during startup, that is before running
"apt-get autoremove" during uptime.
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to
I did it like this: http://askubuntu.com/a/713879/21005
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1440608
Title:
/etc/kernel/postinst.d/apt-auto-removal wants to remove
Cavsfan, try to replace /etc/kernel/postinst.d/apt-auto-removal by the
one I uploaded.
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1440608
Title:
Thanks! I did that.
We'll see when the next kernel comes through in updates.
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1440608
Title:
It is hard to know, if /etc/kernel/postinst.d/apt-auto-removal is called
in conjunction with removing a kernel or installing a kernel. The kernel
in question, whose version is passed as a command line argument, has
"install" as desired action according to dpkg at the time of calling the
script
I think apt-get autoremove may even delete the current kernel, if you
run /etc/kernel/postinst.d/apt-auto-removal, boot to an older kernel
and then run apt-get autoremove. However, maybe that is not big issue,
since there is still another kernel that you can boot next time (if you
haven't removed
The attached script leaves more kernels than one. It keeps some
automatically installed kernels, even if there are also newer manually
installed kernels such as upstream kernels installed.
(https://wiki.ubuntu.com/Kernel/MainlineBuilds)
** Attachment added: "Fixed
I run an alias to do my updating and it's this:
sudo apt-get update && sudo apt-get upgrade && sudo apt-get autoclean
When the update happens and there is a kernel waiting to be dist-upgraded I
believe the
/etc/apt/apt.conf.d/01autoremovekernels file has been manipulated to include
parts of the
For what it's worth, it seems it might be HOW the script is being
called. Testing the apt-auto-removal script here (Kubuntu 15.04) with
kernels 3.19.0-29-generic, 3.19.0-30-generic, and 3.19.0-31-generic
installed and after a reboot to load -31:
1) Noticed the call to autoremove
I also found a work around: once the new kernel is installed and it's
wanting to reboot, delete the 3rd oldest kernel or autoremove it before
rebooting and then the /etc/apt/apt.conf.d/01autoremovekernels file will
contain the 3 kernels, which is better than having one.
--
You received this bug
This just happened to me on Xubuntu 15.10 when 4.2.0-11-generic was installed.
It wanted to leave me with one kernel.
You can refer to these two posts for the detail:
http://ubuntuforums.org/showthread.php?t=2251168=4=13361806#post13361806
I agree with cavsfan that /etc/kernel/postinst.d/apt-auto-removal should
not be triggered when you delete a kernel. What is happening is that
/etc/apt/apt.conf.d/01autoremove-kernels is being set to prevent
kernel[0] and kernel[-2] from being autoremoved, instead of kernel[0]
and kernel[-1].
I have this on all my three 14.04 LTS machines.
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1440608
Title:
/etc/kernel/postinst.d/apt-auto-removal wants to remove all
** Tags added: utopic wily
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1440608
Title:
/etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels
except the
How can you run that when
'''
/etc/kernel/postinst.d/apt-auto-removal
'''
is automagically run at the end of
'''
entering sudo apt-get purge 4 kernel modules.
...
let alone when auto-remove is run.
'''
you will never get the chance.
--
You received this bug notification because you are a
A better workaround seems to be to just run
'''
/etc/kernel/postinst.d/apt-auto-removal $(uname -r)
'''
before `apt-get autoremove`.
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
This continues on even in Linux Mint as well as Ubuntu.
I don't think /etc/kernel/postinst.d/apt-auto-removal should be triggered when
you delete a kernel no matter if it's the17th, 3rd, or 2nd to last kernel.
It is triggered when you just manually delete kernels:
sudo apt-get purge
Since this happens on every version from 14.04 to 15.10 is the problem
that it think my PC is a phone? There should be a way to distinguish
whether the system is a phone or a pc/laptop. Maybe phones should keep
one kernel but I believe PC/laptops should be able to retain 2 kernels.
The
This just happened on Trusty 14.04.2 LTS when 3.13.0-52-generic was
installed on my computer.
** Tags added: trusty
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1440608
I agree you should not have too many kernels on your system but, you
should always have 2 regardless. One for backup and one to use. I would
expect autoremove to remove the 3rd oldest kernel but not the only other
kernel on the system. Which is the case as the last 2 kernel installs
did the exact
** Changed in: apt (Ubuntu)
Status: New = Confirmed
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1440608
Title:
/etc/kernel/postinst.d/apt-auto-removal wants to
Please mark the bug as affecting you then.
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1440608
Title:
/etc/kernel/postinst.d/apt-auto-removal wants to remove all kernels
me too (i confirm above to be reproducible on my machine with latest
Vivid)
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1440608
Title:
** Attachment added: the contents of /etc/apt/apt.conf.d/01autoremove-kernels
after the 3rd oldest kernel is removed.
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1440608/+attachment/4367067/+files/after%20autoremoval%20of%203%20oldest%20kernel
--
You received this bug notification
The workaround to keep the latest two kernels is to edit the
/etc/apt/apt.conf.d/01autoremove-kernels file and change it to list the
latest 2 kernels.
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
After rebooting and autoremoving the 2nd oldest kernel the
/etc/apt/apt.conf.d/01autoremove-kernels file reverts to listing the
3.19.0-11-generic and 3.19.0-12-generic kernels. So only one kernel, the
latest 3.19.0-12-generic is left.
--
You received this bug notification because you are a
This has been happening on 3 different Vivid installs and 2 different
flavors vanilla Ubuntu and Ubuntu Mate. It happens every time a new
kernel is added without fail.
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in
64 matches
Mail list logo