Re: [ubuntu-uk] Unwanted kernels .....

2015-01-22 Thread Andy Whitcroft
On Fri, Aug 15, 2014 at 04:16:55PM +0100, Colin Law wrote:

 Right, gotit, thanks.  I deduce from what I see that 14.04
 automatically uninstalls (or at least makes available for
 autoremoving) all except the current and previous kernel, and all that
 is left is the conf files for previous versions.  Thus (if I am
 correct) there should no longer be any need to worry about old
 kernels, which is great.

Right, kernels are marked as autoinstalled by default and the latest 3
are overridden to be 'needed'.  This lets apt-get autoremove drop all
the older ones.  A couple of you have mentioned that there are a number
of kernels listed, mostly with 'rc' at the start.  That implied they
were removed but not purged, as the kernel really doesn't bring any
config files purging them is safe and reasonable.  I use 'apt-get
autoremove --purge' to cleanup and avoid these building up (existing
ones can be cleared with apt-get purge name).

I also have used the following incantation to pull older kernels from
before the change to auto-track the latest three into the system and let
autoremove have at them:

  sudo apt-mark auto `apt-mark showmanual 
'^linux-(headers|image|image-extra|cloud-tools|tools)-[0-9]'`

Yeah I know I am very late to the party :).

-apw

-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Unwanted kernels .....

2014-08-15 Thread Alan Pope
On 15 August 2014 10:59, Barry Drake ubuntu-advertis...@gmx.com wrote:
 I've gone through an entire development cycle without having to re-install
 14.10 - just amazing!

 I now have a very large number of unwanted kernels.  There used to be a very
 simple gui tool that let me remove all the ones I didn't want, but I don't
 seem to see it anymore.  If I want to do it using apt-get, I'm going to have
 to use the command for every one which will take a while.  Is there a tool
 for automating this just a bit?


Does this command offer to remove some?

sudo apt-get autoremove

Cheers,
Al.

-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Unwanted kernels .....

2014-08-15 Thread Barry Drake

On 15/08/14 11:02, Alan Pope wrote:

On 15 August 2014 10:59, Barry Drake ubuntu-advertis...@gmx.com wrote:

If I want to do it using apt-get, I'm going to have to use the command for 
every one which will take a while.  Is there a tool
for automating this just a bit?

Does this command offer to remove some?
sudo apt-get autoremove
 No.  All it offers to do is to remove one package no longer required.  
Nothing to do with the kernel is shown.  Ah well ... When I've got time 
on my hands I'll go through them.  Thanks anyway.


Regards,Barry.

--
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Unwanted kernels .....

2014-08-15 Thread Dave Morley
On Fri, 15 Aug 2014 11:02:22 +0100
Alan Pope a...@popey.com wrote:

 On 15 August 2014 10:59, Barry Drake ubuntu-advertis...@gmx.com
 wrote:
  I've gone through an entire development cycle without having to
  re-install 14.10 - just amazing!
 
  I now have a very large number of unwanted kernels.  There used to
  be a very simple gui tool that let me remove all the ones I didn't
  want, but I don't seem to see it anymore.  If I want to do it using
  apt-get, I'm going to have to use the command for every one which
  will take a while.  Is there a tool for automating this just a bit?
 
 
 Does this command offer to remove some?
 
 sudo apt-get autoremove
 
 Cheers,
 Al.
 

I don't think it does.  iirc that only works on dependencies of
packages that are nolonger required.  The kernel is a new install along
side the existing so you can flip back if there are issues.

I think you have to do sudo apt-get purge kernel name  and then
autoremove should get rid of any remaining elements aiui.

-- 
You Make It, I'll Break It!

I Love My Job :)

http://www.canonical.com
http://www.ubuntu.com


signature.asc
Description: PGP signature
-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Unwanted kernels .....

2014-08-15 Thread Alan Pope
On 15 August 2014 11:07, Barry Drake ubuntu-advertis...@gmx.com wrote:
 On 15/08/14 11:02, Alan Pope wrote:

 On 15 August 2014 10:59, Barry Drake ubuntu-advertis...@gmx.com wrote:

 If I want to do it using apt-get, I'm going to have to use the command
 for every one which will take a while.  Is there a tool
 for automating this just a bit?

 Does this command offer to remove some?
 sudo apt-get autoremove

  No.  All it offers to do is to remove one package no longer required.
 Nothing to do with the kernel is shown.  Ah well ... When I've got time on
 my hands I'll go through them.  Thanks anyway.



Doesn't take long:-

Open a terminal and make it full screen.
uname -a

Note which kernel you're currently on.

dpkg -l linux-image*

To list what kernels you have installed

sudo apt-get autoremove  

Then in the autoremove line where the dots are (don't type the dots)
just copy/paste (double click a linux-image package name, then middle
click to paste), press space, copy/paste, press space.

Takes about 2 seconds per kernel. Just double click, middle click,
space. Once done, press enter, verify you're removing the right ones,
press Y and you're done.

Al.

-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Unwanted kernels .....

2014-08-15 Thread Simon Greenwood
This command will remove all but your running kernel from the command line:

sudo apt-get remove --purge $(dpkg -l 'linux-*' | sed '/^ii/!d;/'$(uname
-r | sed s/\(.*\)-\([^0-9]\+\)/\1/)'/d;s/^[^ ]* [^ ]* \([^
]*\).*/\1/;/[0-9]/!d')

Source is here:
http://askubuntu.com/questions/2793/how-do-i-remove-or-hide-old-kernel-versions-to-clean-up-the-boot-menu
and it's what I use to make space when /boot is getting on for full.


On 15 August 2014 11:07, Barry Drake ubuntu-advertis...@gmx.com wrote:

 On 15/08/14 11:02, Alan Pope wrote:

 On 15 August 2014 10:59, Barry Drake ubuntu-advertis...@gmx.com wrote:

 If I want to do it using apt-get, I'm going to have to use the command
 for every one which will take a while.  Is there a tool
 for automating this just a bit?

 Does this command offer to remove some?
 sudo apt-get autoremove

  No.  All it offers to do is to remove one package no longer required.
 Nothing to do with the kernel is shown.  Ah well ... When I've got time on
 my hands I'll go through them.  Thanks anyway.

 Regards,Barry.


 --
 ubuntu-uk@lists.ubuntu.com
 https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
 https://wiki.ubuntu.com/UKTeam/




-- 
Twitter: @sfgreenwood
TBA are particularly glib
-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Unwanted kernels .....

2014-08-15 Thread Colin Law
On 15 August 2014 11:12, Alan Pope a...@popey.com wrote:
 On 15 August 2014 11:07, Barry Drake ubuntu-advertis...@gmx.com wrote:
 On 15/08/14 11:02, Alan Pope wrote:

 On 15 August 2014 10:59, Barry Drake ubuntu-advertis...@gmx.com wrote:

 If I want to do it using apt-get, I'm going to have to use the command
 for every one which will take a while.  Is there a tool
 for automating this just a bit?

 Does this command offer to remove some?
 sudo apt-get autoremove

  No.  All it offers to do is to remove one package no longer required.
 Nothing to do with the kernel is shown.  Ah well ... When I've got time on
 my hands I'll go through them.  Thanks anyway.



 Doesn't take long:-

 Open a terminal and make it full screen.
 uname -a

 Note which kernel you're currently on.

 dpkg -l linux-image*

 To list what kernels you have installed

 sudo apt-get autoremove  

 Then in the autoremove line where the dots are (don't type the dots)
 just copy/paste (double click a linux-image package name, then middle
 click to paste), press space, copy/paste, press space.

That doesn't seem to work for me.  One of the lines from dpkg is
rc  linux-image-3.2.0-2 3.2.0-27.43i386   Linux kernel
image for version 3.2.0 on 32
but:
$ sudo apt-get autoremove linux-image-3.2.0-2
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'linux-image-3.2.0-27-generic-pae' for regex
'linux-image-3.2.0-2'
Package 'linux-image-3.2.0-27-generic-pae' is not installed, so not removed
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

Colin

-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Unwanted kernels .....

2014-08-15 Thread Alan Pope
On 15 August 2014 11:31, Colin Law clan...@gmail.com wrote:
 On 15 August 2014 11:12, Alan Pope a...@popey.com wrote:
 On 15 August 2014 11:07, Barry Drake ubuntu-advertis...@gmx.com wrote:
 On 15/08/14 11:02, Alan Pope wrote:

 On 15 August 2014 10:59, Barry Drake ubuntu-advertis...@gmx.com wrote:

 If I want to do it using apt-get, I'm going to have to use the command
 for every one which will take a while.  Is there a tool
 for automating this just a bit?

 Does this command offer to remove some?
 sudo apt-get autoremove

  No.  All it offers to do is to remove one package no longer required.
 Nothing to do with the kernel is shown.  Ah well ... When I've got time on
 my hands I'll go through them.  Thanks anyway.



 Doesn't take long:-

 Open a terminal and make it full screen.
 uname -a

 Note which kernel you're currently on.

 dpkg -l linux-image*

 To list what kernels you have installed

 sudo apt-get autoremove  

 Then in the autoremove line where the dots are (don't type the dots)
 just copy/paste (double click a linux-image package name, then middle
 click to paste), press space, copy/paste, press space.

 That doesn't seem to work for me.  One of the lines from dpkg is
 rc  linux-image-3.2.0-2 3.2.0-27.43i386   Linux kernel
 image for version 3.2.0 on 32
 but:
 $ sudo apt-get autoremove linux-image-3.2.0-2
 Reading package lists... Done
 Building dependency tree
 Reading state information... Done
 Note, selecting 'linux-image-3.2.0-27-generic-pae' for regex
 'linux-image-3.2.0-2'
 Package 'linux-image-3.2.0-27-generic-pae' is not installed, so not removed
 0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.


It's truncated. Maybe your terminal window is too small? (which is why
I suggested making it full screen).

-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Unwanted kernels .....

2014-08-15 Thread Colin Law
On 15 August 2014 11:36, Alan Pope a...@popey.com wrote:
 On 15 August 2014 11:31, Colin Law clan...@gmail.com wrote:
 On 15 August 2014 11:12, Alan Pope a...@popey.com wrote:
 On 15 August 2014 11:07, Barry Drake ubuntu-advertis...@gmx.com wrote:
 On 15/08/14 11:02, Alan Pope wrote:

 On 15 August 2014 10:59, Barry Drake ubuntu-advertis...@gmx.com wrote:

 If I want to do it using apt-get, I'm going to have to use the command
 for every one which will take a while.  Is there a tool
 for automating this just a bit?

 Does this command offer to remove some?
 sudo apt-get autoremove

  No.  All it offers to do is to remove one package no longer required.
 Nothing to do with the kernel is shown.  Ah well ... When I've got time on
 my hands I'll go through them.  Thanks anyway.



 Doesn't take long:-

 Open a terminal and make it full screen.
 uname -a

 Note which kernel you're currently on.

 dpkg -l linux-image*

 To list what kernels you have installed

 sudo apt-get autoremove  

 Then in the autoremove line where the dots are (don't type the dots)
 just copy/paste (double click a linux-image package name, then middle
 click to paste), press space, copy/paste, press space.

 That doesn't seem to work for me.  One of the lines from dpkg is
 rc  linux-image-3.2.0-2 3.2.0-27.43i386   Linux kernel
 image for version 3.2.0 on 32
 but:
 $ sudo apt-get autoremove linux-image-3.2.0-2
 Reading package lists... Done
 Building dependency tree
 Reading state information... Done
 Note, selecting 'linux-image-3.2.0-27-generic-pae' for regex
 'linux-image-3.2.0-2'
 Package 'linux-image-3.2.0-27-generic-pae' is not installed, so not removed
 0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.


 It's truncated. Maybe your terminal window is too small? (which is why
 I suggested making it full screen).

Ah, I see.  To get the line
rc  linux-image-extra-3.6.0-030600rc1-generic
3.6.0-030600rc1.201208022 i386  Linux kernel image
for version 3.6.0 on 32 bit x86 SMP
to not truncate the name I had to extend the window into the second
monitor even though there is empty space at the right hand end of the
line.  Its algorithm does not seem ideal.

Colin

-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Unwanted kernels .....

2014-08-15 Thread Robert McWilliam
On Fri, Aug 15, 2014, at 11:57 AM, Colin Law wrote:
  It's truncated. Maybe your terminal window is too small? (which is why
  I suggested making it full screen).
 
 Ah, I see.  To get the line
 rc  linux-image-extra-3.6.0-030600rc1-generic
 3.6.0-030600rc1.201208022 i386  Linux kernel image
 for version 3.6.0 on 32 bit x86 SMP
 to not truncate the name I had to extend the window into the second
 monitor even though there is empty space at the right hand end of the
 line.  Its algorithm does not seem ideal.

Looks like it's expecting the description to be the biggest field so
giving it most space. 

One way I use to get round programs doing this is to pipe the output to
cat, the program then doesn't have a terminal size to try and fit into
and usually makes fields big enough to hold the data in them. You can
get the same effect by redirecting to a file and then opening with the
editor of your choice [1].

Robert

[1] If that choice isn't emacs you're doing it wrong ;)

-- 
Robert McWilliam  r...@allmail.netwww.ormiret.com

Disclaimer: Opinions cited by me are not necessarily my opinions. 
Facts cited by me are not necessarily facts.

-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Unwanted kernels .....

2014-08-15 Thread Barry Drake

On 15/08/14 11:57, Colin Law wrote:
Ah, I see. To get the line rc 
linux-image-extra-3.6.0-030600rc1-generic 3.6.0-030600rc1.201208022 
i386 Linux kernel image for version 3.6.0 on 32 bit x86 SMP to not 
truncate the name I had to extend the window into the second monitor 
even though there is empty space at the right hand end of the line. 
Its algorithm does not seem ideal. Colin 


Redirecting the output to a text file solves that problem.  It's much 
easier now.  Thanks guys.  I'll save myself a note for next time.


Barry.


--
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Unwanted kernels .....

2014-08-15 Thread Alan Lord

On 15/08/14 10:59, Barry Drake wrote:

I've gone through an entire development cycle without having to
re-install 14.10 - just amazing!

I now have a very large number of unwanted kernels.  There used to be a
very simple gui tool that let me remove all the ones I didn't want, but
I don't seem to see it anymore.  If I want to do it using apt-get, I'm
going to have to use the command for every one which will take a while.
Is there a tool for automating this just a bit?


Here's a very neat bash command that I stick in ~/bin for this very purpose:

http://www.tolaris.com/2012/07/19/removing-old-kernels-from-ubuntu/

HTH

Al





--
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Unwanted kernels .....

2014-08-15 Thread Colin Law
On 15 August 2014 13:46, Alan Lord alansli...@gmail.com wrote:
 On 15/08/14 10:59, Barry Drake wrote:

 I've gone through an entire development cycle without having to
 re-install 14.10 - just amazing!

 I now have a very large number of unwanted kernels.  There used to be a
 very simple gui tool that let me remove all the ones I didn't want, but
 I don't seem to see it anymore.  If I want to do it using apt-get, I'm
 going to have to use the command for every one which will take a while.
 Is there a tool for automating this just a bit?


 Here's a very neat bash command that I stick in ~/bin for this very purpose:

 http://www.tolaris.com/2012/07/19/removing-old-kernels-from-ubuntu/

That only removed one kernel for me (I have lots more).

Colin

-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Unwanted kernels .....

2014-08-15 Thread Colin Law
On 15 August 2014 13:55, Colin Law clan...@gmail.com wrote:
 On 15 August 2014 13:46, Alan Lord alansli...@gmail.com wrote:
 ..
 Here's a very neat bash command that I stick in ~/bin for this very purpose:

 http://www.tolaris.com/2012/07/19/removing-old-kernels-from-ubuntu/

 That only removed one kernel for me (I have lots more).


And the reason seems to be that dpkg -l linux* shows loads of packages
that are not actually installed.  What is that all about?

Colin

-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Unwanted kernels .....

2014-08-15 Thread Alan Pope
On 15 August 2014 14:09, Colin Law clan...@gmail.com wrote:
 On 15 August 2014 13:55, Colin Law clan...@gmail.com wrote:
 On 15 August 2014 13:46, Alan Lord alansli...@gmail.com wrote:
 ..
 Here's a very neat bash command that I stick in ~/bin for this very purpose:

 http://www.tolaris.com/2012/07/19/removing-old-kernels-from-ubuntu/

 That only removed one kernel for me (I have lots more).


 And the reason seems to be that dpkg -l linux* shows loads of packages
 that are not actually installed.  What is that all about?


dpkg -l linux-image* | grep ^ii

That'll show only those installed (line starts with ii)

Cheers,
Al.

-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Unwanted kernels .....

2014-08-15 Thread Barry Drake

On 15/08/14 13:46, Alan Lord wrote:

On 15/08/14 10:59, Barry Drake wrote:

I now have a very large number of unwanted kernels.
Here's a very neat bash command that I stick in ~/bin for this very 
purpose:

http://www.tolaris.com/2012/07/19/removing-old-kernels-from-ubuntu/


Thanks Alan.  That is really neat.  I've run the first part of the 
command and the three variables are precisely what I want.  I'll amend 
the script just a little and keep it in my home directory with other 
neat little scripts I use from time to time.


Great job!

Barry.

--
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Unwanted kernels .....

2014-08-15 Thread Colin Law
On 15 August 2014 14:45, Alan Pope a...@popey.com wrote:
 On 15 August 2014 14:09, Colin Law clan...@gmail.com wrote:
 On 15 August 2014 13:55, Colin Law clan...@gmail.com wrote:
 On 15 August 2014 13:46, Alan Lord alansli...@gmail.com wrote:
 ..
 Here's a very neat bash command that I stick in ~/bin for this very 
 purpose:

 http://www.tolaris.com/2012/07/19/removing-old-kernels-from-ubuntu/

 That only removed one kernel for me (I have lots more).


 And the reason seems to be that dpkg -l linux* shows loads of packages
 that are not actually installed.  What is that all about?


 dpkg -l linux-image* | grep ^ii

 That'll show only those installed (line starts with ii)

Right, gotit, thanks.  I deduce from what I see that 14.04
automatically uninstalls (or at least makes available for
autoremoving) all except the current and previous kernel, and all that
is left is the conf files for previous versions.  Thus (if I am
correct) there should no longer be any need to worry about old
kernels, which is great.

Colin

-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Unwanted kernels

2013-05-04 Thread Mark Fraser
On 4 May 2013 15:54, Tony Pursell a...@princeswalk.fsnet.co.uk wrote:

 Hi All

 Has anyone got any advice or tips on how to safely rid oneself of
unwanted kernel.  I thought this was an issue that had been solved but I'm
still left with 5 ver 2.6 and 8 ver 3.0 kernels despite having upgraded to
Raring.  I don't mind keeping the latest 3.8 kernel and the 3.5 before that
and the 3.2 before that.

I'm sure 13.04 does remove older kernels and only keeps the last 3, but
you'll have to remove the 2.6 and 3.0 kernels manually.
-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Unwanted kernels

2013-05-04 Thread Colin Law
On 4 May 2013 15:53, Tony Pursell a...@princeswalk.fsnet.co.uk wrote:
 Hi All

 Has anyone got any advice or tips on how to safely rid oneself of unwanted
 kernel.  I thought this was an issue that had been solved but I'm still left
 with 5 ver 2.6 and 8 ver 3.0 kernels despite having upgraded to Raring.  I
 don't mind keeping the latest 3.8 kernel and the 3.5 before that and the 3.2
 before that.

I can never remember exactly how to do it, I just google
ubuntu remove kernels
and multiple good hits appear.  I don't think there is any danger as
long as you don't remove the current ones.

Colin

-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Unwanted kernels

2013-05-04 Thread A
On 04/05/13 15:53, Tony Pursell wrote:
 Hi All

 Has anyone got any advice or tips on how to safely rid oneself of
 unwanted kernel.  I thought this was an issue that had been solved but
 I'm still left with 5 ver 2.6 and 8 ver 3.0 kernels despite having
 upgraded to Raring.  I don't mind keeping the latest 3.8 kernel and
 the 3.5 before that and the 3.2 before that.

 Tony


I normally fire up synaptic (synaptic package manager) and do a search
in the 'installed' section for 'linux-' and then remove what i don't
want. You could also search by version numbers. Make sure to pull out
the 'headers' and 'image' type packages - possibly 'image-extra' for
that version too. There are of course other ways of going about it. Just
as an added reminder: You can always check what version you're running
with the 'uname -a' command, or use'sudo update-grub2' to see a list of
all the installed kernel versions.
-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Unwanted kernels

2013-05-04 Thread Tyler J. Wagner
On 2013-05-04 16:47, Colin Law wrote:
 On 4 May 2013 15:53, Tony Pursell a...@princeswalk.fsnet.co.uk wrote:
 Hi All

 Has anyone got any advice or tips on how to safely rid oneself of unwanted
 kernel.  I thought this was an issue that had been solved but I'm still left
 with 5 ver 2.6 and 8 ver 3.0 kernels despite having upgraded to Raring.  I
 don't mind keeping the latest 3.8 kernel and the 3.5 before that and the 3.2
 before that.
 
 I can never remember exactly how to do it, I just google
 ubuntu remove kernels
 and multiple good hits appear.  I don't think there is any danger as
 long as you don't remove the current ones.

I use the following to purge all kernels which aren't the current kernel or
the latest kernel by version number.

( \
KERNEL_HIGHEST=$(dpkg -l 'linux-image-[0-9.]*-[0-9]*-[a-zA-Z0-9]*' | grep
^ii | awk '{print $2}' | sort -V | tail -n 1 | sed
's/^linux-image-\([0-9.]*-[0-9]*\)-.*$/\1/') ; \
KERNEL_CURRENT=$(uname -r | sed s/\(.*\)-\([^0-9]\+\)/\1/) ; \
sudo apt-get purge $(dpkg -l 'linux-*-[0-9-]*' | grep ^ii | awk '{print
$2}' | sed /$KERNEL_CURRENT/d;/$KERNEL_HIGHEST/d ) ; \
)

The above will list the kernels to be removed and prompt you before proceeding.

Regards,
Tyler

-- 
Anyone who truly understands UI design realizes that every preference
option is an admission of defeat: it's there because you couldn't just
get it right the first time.
   -- Jamie Zawinski

-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Unwanted kernels

2013-05-04 Thread pete smout

On 04/05/13 17:01, A wrote:

On 04/05/13 15:53, Tony Pursell wrote:

Hi All

Has anyone got any advice or tips on how to safely rid oneself of
unwanted kernel.  I thought this was an issue that had been solved but
I'm still left with 5 ver 2.6 and 8 ver 3.0 kernels despite having
upgraded to Raring.  I don't mind keeping the latest 3.8 kernel and
the 3.5 before that and the 3.2 before that.

Tony



I normally fire up synaptic (synaptic package manager) and do a search
in the 'installed' section for 'linux-' and then remove what i don't
want. You could also search by version numbers. Make sure to pull out
the 'headers' and 'image' type packages - possibly 'image-extra' for
that version too. There are of course other ways of going about it. Just
as an added reminder: You can always check what version you're running
with the 'uname -a' command, or use'sudo update-grub2' to see a list of
all the installed kernel versions.



Hi,
I always use Ubuntu Tweak http://ubuntu-tweak.com/ or apt-get autoremove

just my 00.05c

Pete



--
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/


Re: [ubuntu-uk] Unwanted kernels

2013-05-04 Thread Liam Proven
On 4 May 2013 15:53, Tony Pursell a...@princeswalk.fsnet.co.uk wrote:
 Hi All

 Has anyone got any advice or tips on how to safely rid oneself of unwanted
 kernel.  I thought this was an issue that had been solved but I'm still left
 with 5 ver 2.6 and 8 ver 3.0 kernels despite having upgraded to Raring.  I
 don't mind keeping the latest 3.8 kernel and the 3.5 before that and the 3.2
 before that.

This is my effort at simple, clear instructions:
http://liam-on-linux.livejournal.com/20347.html

--
Liam Proven • Profile: http://lproven.livejournal.com/profile
Email: lpro...@cix.co.uk • GMail/G+/Twitter/Flickr/Facebook: lproven
MSN: lpro...@hotmail.com • Skype/AIM/Yahoo/LinkedIn: liamproven
Tel: +44 20-8685-0498 • Cell: +44 7939-087884

-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/