Idea for command: purge-kernels

4 views
Skip to first unread message

Reuben Thomas

unread,
Feb 27, 2013, 8:55:11 PM2/27/13
to wa...@googlegroups.com
Old kernels are (with good reason) kept installed by default, but
until such time as there's an official solution (e.g. allow them to be
purged once a new kernel has been running for some days), it would be
nice to be able to purge them manually without having to name the
packages.

--
http://rrt.sc3d.org

Tshepang Lekhonkhobe

unread,
Feb 28, 2013, 1:01:43 AM2/28/13
to wa...@googlegroups.com
Good idea; what do you suggest the subcommand to be? PURGE-OLD-KERNELS maybe?

Regarding the exact workings, what happens if, say, one has installed
in the past amd64, i386, and rt-amd64 kernels for example? Do we leave
those lying around? What about the custom-built one, which may have
funny names?

Reuben Thomas

unread,
Feb 28, 2013, 5:22:29 AM2/28/13
to wa...@googlegroups.com
On 28 February 2013 06:01, Tshepang Lekhonkhobe <tshe...@gmail.com> wrote:
>
> Good idea; what do you suggest the subcommand to be? PURGE-OLD-KERNELS maybe?
>
> Regarding the exact workings, what happens if, say, one has installed
> in the past amd64, i386, and rt-amd64 kernels for example? Do we leave
> those lying around? What about the custom-built one, which may have
> funny names?

purge-old-kernels is better than my suggestion (purge-kernels).

I suggest not trying to cover any of the complex cases: they won't
apply most of the time (so not much time saving) and are likely to be
easy to mess up.

Tshepang Lekhonkhobe

unread,
Feb 28, 2013, 2:58:44 PM2/28/13
to wa...@googlegroups.com
So, which of the cases I mentioned do you consider complex? I need to
know how to filter, for example. Maybe you can provide a patch, for
then we know exactly what you want, without this back-and-forth.

Karl Schmidt

unread,
Feb 28, 2013, 3:01:06 PM2/28/13
to wa...@googlegroups.com
Great idea!

--
--------------------------------------------------------------------------------
Karl Schmidt EMail Ka...@xtronics.com
Transtronics, Inc. WEB http://secure.transtronics.com
3209 West 9th Street Ph (785) 841-3089
Lawrence, KS 66049 FAX (785) 841-0434

The only valid market survey is a signed purchase order. -- Jay Last

--------------------------------------------------------------------------------

Reuben Thomas

unread,
Feb 28, 2013, 3:02:54 PM2/28/13
to wa...@googlegroups.com
I hadn't really thought how it would be implemented, to be honest. I
think the simplest thing is "apt-get remove all linux-image packages
apart from the most recent and/or running one". That doesn't cover the
case of non-Linux kernels, and I still don't know how to express that
in apt-speak.

--
http://rrt.sc3d.org

Karl Schmidt

unread,
Feb 28, 2013, 6:27:14 PM2/28/13
to wa...@googlegroups.com
How about :
$ wajig purgeoldkernel n

Where n defaults to 1 - to keep one extra kernel - so you end up with the running kernel and one
older to fall back on.




--
--------------------------------------------------------------------------------
Karl Schmidt EMail Ka...@xtronics.com
Transtronics, Inc. WEB http://secure.transtronics.com
3209 West 9th Street Ph (785) 841-3089
Lawrence, KS 66049 FAX (785) 841-0434

Socialism is just another form of stealing.
Government takes, by the threat of force,
what isn't rightfully theirs to take.
kps

--------------------------------------------------------------------------------
Reply all
Reply to author
Forward
0 new messages