[clug] [anne.a.gunn at gmail.com: Ubuntu problem] -> removing older kernels

Bryan Kilgallin bryan at netspeed.com.au
Fri Aug 14 13:02:35 UTC 2015


Scott:

>>> removed 8! older kernels and header packages ('that' trimmed the GRUB
>>> menu)
>> How do you do that safely?
> Slight correction (I failed to scroll right in my notes). 21 kernels and
> header packages.
>
> determined the kernel in use e.g.:-
> uname -r

That reported "3.13.0-61-generic".

> 3.16.0-0.bpo.4-686-pae
>
> confirmed that the kernel functioned properly
>
> listed all the kernels and kernel header that were installed, except
> what was relevant to the kernel in use, and removed them:-
> apt-get -s remove `dpkg --get-selections|grep
> 'linux-image\|linux-headers'|grep -v 3.16` | more

So at a bash prompt, I entered the following line.
sudo apt-get -s remove `dpkg --get-selections|grep 
'linux-image\|linux-headers'|grep -v 3.13.0-61-generic` | more

Which responded as follows.

Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package install
E: Unable to locate package install
E: Unable to locate package install
E: Unable to locate package install
E: Unable to locate package install
E: Unable to locate package install
E: Unable to locate package install
E: Unable to locate package install
E: Unable to locate package install
E: Unable to locate package install
E: Unable to locate package install

> If the projected results look fine, rerun the command but replace "-s"
> with "--purge -y", and also remove the "| more".

That didn't look fine to me. What went wrong?

-- 
www.netspeed.com.au/bryan/
==========================




More information about the linux mailing list