[ubuntu-us-mi] Removing all but current kernel

Duane Brown dobwan at earthlink.net
Thu Jun 30 16:04:01 UTC 2011


yes it is, I was asking Jim, Craig and Robert last night at CHC about 
this and he posted it.

On my desktop I have a bunch of old kernels installed and want to do 
some housekeeping. He had this ready and obviously was willing to share.

Duane
On 06/30/2011 08:51 AM, Jay Wren wrote:
> BRILLIANT!
>
> I love this.
>
> Thanks,
> --
> j
>
> On Jun 29, 2011, at 8:24 PM, Robert Citek wrote:
>
>> One-liner to removal all but the current installed kernel:
>>
>> apt-get purge $(
>> ls /boot/vmlinuz-* |
>> grep -v $(uname -r) |
>> xargs -r dpkg -S |
>> cut -d: -f1 |
>> sort |
>> uniq
>> )
>>
>> Regards,
>> - Robert
>>
>> -- 
>> ubuntu-us-mi mailing list
>> ubuntu-us-mi at lists.ubuntu.com
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-us-mi
>




More information about the ubuntu-us-mi mailing list