Since I am not a pro like you guys etc. would it be acceptable to leave the 'headers' in apt 'or are they just wasting space' since I now have only 2 kernel images on the computer? I suppose I should have started by using the 'purge' command right from the start.

Thank you for your help.

Date: Fri, 21 Feb 2014 18:50:28 -0600
From: gsker at skerbitz.org
To: tclug-list at mn-linux.org
Subject: Re: [tclug-list] A question about dpkg

I find
    sudo aptitude purge '~i2.6.32-57'
is a good way to select the right packages.
I often do things like.
     sudo aptitude purge '~i3.0.8-2[459]'
 
That takes care of all the headers and images and -generic and -kernel and 
-virtual....
 
Someone posted a really nice one that used the uname output very nicely 
but I've lost it. Probably one of these:
http://www.commandlinefu.com/commands/view/5829/remove-all-unused-kernels-with-apt-get
 
If you catch yourself doing an aptitude search piped to grep you're 
probably doing it wrong.
 
You would catch yourself doing that for a a good reason (IMHO) -- the 
documentation for the very powerful search is a rather inscrutable.
 
As to Ubuntu not cleaning up kernels.....
 
There actually is an autoremove. I don't know how I enabled it, 
but there are remnants that give me a clue:
 
gsker at veeta:~/mail> dpkg -S /etc/kernel/postinst.d/apt-auto-removal
apt: /etc/kernel/postinst.d/apt-auto-removal
 
and /etc/apt/apt.conf.d/01autoremove-kernels
 
I catch it removing kernel packages once in a while.  :-)
 
FWIW
 
On Fri, 21 Feb 2014, tclug at freakzilla.com wrote:
 
> You cn remove anything that's not for the current kernel version. One of my 
> biggest nitpicks with Ubuntu is that it doesn't do that automatically.
>
> Like David said, it's not a bad idea to leave the headers in there.
>
>
> On Thu, 20 Feb 2014, paul g wrote:
>
>> I have a computer running Ubuntu 10.04 and have removed most of the images
>> using the following command in bash     sudo aptitude search linux-image |
>> grep -E "^i"
>> 
>> then I updated grub,
>> 
>> I pulled a dpkg -l |less command and here are the results.
>> 
>> ri  linux-headers-2.6.32-45             
>> 2.6.32-45.104                                   Header files related to
>> Linux kernel version 2.6.32
>> ii  linux-headers-2.6.32-45-generic     
>> 2.6.32-45.104                                   Linux kernel headers for
>> version 2.6.32 on x86/x86_
>> ii  linux-headers-2.6.32-46             
>> 2.6.32-46.108                                   Header files related to
>> Linux kernel version 2.6.32
>> ii  linux-headers-2.6.32-46-generic     
>> 2.6.32-46.108                                   Linux kernel headers for
>> version 2.6.32 on x86/x86_
>> ii  linux-headers-2.6.32-47             
>> 2.6.32-47.109                                   Header files related to
>> Linux kernel version 2.6.32
>> ii  linux-headers-2.6.32-47-generic     
>> 2.6.32-47.109                                   Linux kernel headers for
>> version 2.6.32 on x86/x86_
>> ii  linux-headers-2.6.32-48             
>> 2.6.32-48.110                                   Header files related to
>> Linux kernel version 2.6.32
>> ii  linux-headers-2.6.32-48-generic     
>> 2.6.32-48.110                                   Linux kernel headers for
>> version 2.6.32 on x86/x86_
>> ii  linux-headers-2.6.32-49             
>> 2.6.32-49.111                                   Header files related to
>> Linux kernel version 2.6.32
>> ii  linux-headers-2.6.32-49-generic     
>> 2.6.32-49.111                                   Linux kernel headers for
>> version 2.6.32 on x86/x86_
>> ii  linux-headers-2.6.32-50             
>> 2.6.32-50.112                                   Header files related to
>> Linux kernel version 2.6.32
>> ii  linux-headers-2.6.32-50-generic     
>> 2.6.32-50.112                                   Linux kernel headers for
>> version 2.6.32 on x86/x86_
>> ii  linux-headers-2.6.32-51             
>> 2.6.32-51.113                                   Header files related to
>> Linux kernel version 2.6.32
>> ii  linux-headers-2.6.32-51-generic     
>> 2.6.32-51.113                                   Linux kernel headers for
>> version 2.6.32 on x86/x86_
>> ii  linux-headers-2.6.32-52             
>> 2.6.32-52.114                                   Header files related to
>> Linux kernel version 2.6.32
>> ii  linux-headers-2.6.32-52-generic     
>> 2.6.32-52.114                                   Linux kernel headers for
>> version 2.6.32 on x86/x86_
>> ii  linux-headers-2.6.32-53             
>> 2.6.32-53.115                                   Header files related to
>> Linux kernel version 2.6.32
>> ii  linux-headers-2.6.32-53-generic     
>> 2.6.32-53.115                                   Linux kernel headers for
>> version 2.6.32 on x86/x86_
>> ii  linux-headers-2.6.32-54             
>> 2.6.32-54.116                                   Header files related to
>> Linux kernel version 2.6.32
>> ii  linux-headers-2.6.32-54-generic     
>> 2.6.32-54.116                                   Linux kernel headers for
>> version 2.6.32 on x86/x86_
>> ii  linux-headers-2.6.32-55             
>> 2.6.32-55.117                                   Header files related to
>> Linux kernel version 2.6.32
>> ii  linux-headers-2.6.32-55-generic     
>> 2.6.32-55.117                                   Linux kernel headers for
>> version 2.6.32 on x86/x86_
>> ii  linux-headers-2.6.32-56             
>> 2.6.32-56.118                                   Header files related to
>> Linux kernel version 2.6.32
>> ii  linux-headers-2.6.32-56-generic     
>> 2.6.32-56.118                                   Linux kernel headers for
>> version 2.6.32 on x86/x86_
>> ii  linux-headers-2.6.32-57             
>> 2.6.32-57.119                                   Header files related to
>> Linux kernel version 2.6.32
>> ii  linux-headers-2.6.32-57-generic     
>> 2.6.32-57.119                                   Linux kernel headers for
>> version 2.6.32 on x86/x86_
>> ii  linux-headers-generic               
>> 2.6.32.57.64                                    Generic Linux kernel 
>> headers
>> ii  linux-image-2.6.32-55-generic       
>> 2.6.32-55.117                                   Linux kernel image for
>> version 2.6.32 on x86/x86_64
>> ii  linux-image-2.6.32-56-generic       
>> 2.6.32-56.118                                   Linux kernel image for
>> version 2.6.32 on x86/x86_64
>> ii  linux-image-2.6.32-57-generic       
>> 2.6.32-57.119                                   Linux kernel image for
>> version 2.6.32 on x86/x86_64
>> :
>> please help
>> 
>> note the ri   preceding the linux-headers-2.6.32-45 
>> 
>> Do I need to keep the headers on the computer in order to continue to
>> operate the programs I have installed.
>> 
>> Thank You.
>> 
>

_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
tclug-list at mn-linux.org
http://mailman.mn-linux.org/mailman/listinfo/tclug-list 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mn-linux.org/pipermail/tclug-list/attachments/20140221/5e4234cc/attachment-0001.html>