Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have installed the mainline kernel 3.10 as recommended here so that I can have my wifi: http://askubuntu.com/a/322737/128334

I'm running into the same problems as why is dpkg configuration running out of space on ubuntu 10.04 when there is space available?

Is it safe to run the recommended command in the blog in that answer? If not, how should it be modified?

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

dpkg --list | grep linux-image

ii  linux-image-3.10.1-031001-generic         3.10.1-031001.201307131550           amd64        Linux kernel image for version 3.10.1 on 64 bit x86 SMP
ii  linux-image-3.8.0-19-generic              3.8.0-19.30                          amd64        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
ii  linux-image-3.8.0-26-generic              3.8.0-26.38                          amd64        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
ii  linux-image-3.8.0-27-generic              3.8.0-27.40                          amd64        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
ii  linux-image-3.8.0-29-generic              3.8.0-29.42                          amd64        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
ii  linux-image-extra-3.8.0-19-generic        3.8.0-19.30                          amd64        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
ii  linux-image-extra-3.8.0-26-generic        3.8.0-26.38                          amd64        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
ii  linux-image-extra-3.8.0-27-generic        3.8.0-27.40                          amd64        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
iF  linux-image-extra-3.8.0-29-generic        3.8.0-29.42                          amd64        Linux kernel image for version 3.8.0 on 64 bit x86 SMP
iU  linux-image-generic                       3.8.0.29.47                          amd64        Generic Linux kernel image

I'm not sure about which ones are the latest. Please show me which ones are definitely the oldest and unneeded and can be removed with sudo apt-get purge linux-image-x.x.x.x-generic.

share|improve this question
add comment

3 Answers

up vote 4 down vote accepted

Yes it's safe to use kernels you don't use. However I would check this question first for other recommended ways to remove old kernels:

share|improve this answer
add comment

Hm, I would leave 1 or 2 kernels in the installed systems. It is almost not possible, but it could be that by update the newest kernel gets malformed. So it would be possible to return then via the next installed kernel into system.

I only say this not because of Ubuntu, but of else distributions, where sometimes updates malformed the installation somehow. Ubuntu is quite secure and quite reliable with updating files. It belongs only to the circumspectly user or admin, to allow himself an additional emergency-mode for his system, besides the protected-mode.

share|improve this answer
    
I'm in the process of doing the second most voted answer in Jorge's link. would you mind noting edit and recommending which ones should be removed? ty! –  Gracchus Aug 20 '13 at 16:57
    
@Gracchus - hm? what you mean ? which kernel ones should be removed ? (my English is not best sometimes ... ) –  dschinn1001 Aug 20 '13 at 18:31
    
just a sec ago, your newly-edited question appears freshly updated. well, on my system I have removed kernel 3.2 and regret this up to today now ... –  dschinn1001 Aug 20 '13 at 18:33
1  
I would leave 2 kernels of 3.8 (with straight numbers as version) and of course leave 3.10 in your system. There is no real receipt for that - regarding of volunteer-coders, where is not sure, which one is best. –  dschinn1001 Aug 20 '13 at 18:36
add comment

The easy way to do the job is using the Ubuntu Tweak.

enter image description here

share|improve this answer
    
Thanks, It did the trick –  dariush Mar 6 at 14:22
    
@dariush You're welcome! –  Dozortsev Anton Mar 6 at 16:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.