Re:Ask HN: What do you want to see in Ubuntu 17.10?
by noja on Friday March 31, 2017 @09:13AM
(#14003321)
+1 then I can kill my custom "remove oldest kernels, except the running one, and leave at least two other kernels" script.
[ Parent
| on HN ]
Re:Ask HN: What do you want to see in Ubuntu 17.10?
by jcadam on Friday March 31, 2017 @09:17AM
(#14003362)
Yes, I had this same problem when I was on Xubuntu. Fedora and CentOS(and I'm assuming many other distros) seem to handle kernel updates just fine without forcing me to manually clean out old images from /boot periodically (was always too lazy to write a script).
Re:Ask HN: What do you want to see in Ubuntu 17.10?
by vetinari on Friday March 31, 2017 @10:07AM
(#14003880)
What Fedora and CentOS do is a generic yum/dnf option: installonly_limit. It allows you to keep limit on the amount of packages with the same name and different versions, kernel included.
Re:Ask HN: What do you want to see in Ubuntu 17.10?
by nyolfen on Friday March 31, 2017 @01:10PM
(#14005833)
would you mind sharing this in the meantime?
Re:Ask HN: What do you want to see in Ubuntu 17.10?
by tombrossman on Friday March 31, 2017 @01:24PM
(#14005986)
I've been using this for years. I believe it only keeps one old kernel version though, not two like you requested. Tested and working for weekly use since 12.04 though 16.04:
echo $(dpkg --list | grep linux-image | awk '{ print $2 }' | sort | sed -n '/'`uname -r`'/q;p') $(dpkg --list | grep linux-headers | awk '{ print $2 }' | sort -n | sed -n '/'"$(uname -r | sed "s/\([0-9.-]*\)-\([^0-9]\+\)/\1/")"'/q;p') | xargs sudo apt-get -y purge
Re:Ask HN: What do you want to see in Ubuntu 17.10?
by throwaway6556 on Friday March 31, 2017 @03:13PM
(#14007155)
I guarantee there's a way to get that pipe to purge all packages in your system.