3

I have tried Ubuntu Tweak, Synaptic and some command line stuff I found online, but nothing seems to work.

This is the output of dpkg -l linux-image-\* | grep ^ii

ii  linux-image-3.13.0-24-generic                               3.13.0-24.47                                        amd64        Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-extra-3.13.0-24-generic                         3.13.0-24.47                                        amd64        Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-generic                                         3.13.0.24.29                                        amd64        Generic Linux kernel image

What are my options? I only need to free 3 MB for a the kernel update.

Thanks in advance!

When I run this, I get that output:

$ sudo update-grub
Generando archivo de configuración grub...
Se encontró una imagen linux: /boot/vmlinuz-3.13.0-24-generic
Se encontró una imagen initrd: /boot/initrd.img-3.13.0-24-generic
Se encontró una imagen linux: /boot/vmlinuz-3.0.0-19-generic
Se encontró una imagen initrd: /boot/initrd.img-3.0.0-19-generic
Se encontró una imagen linux: /boot/vmlinuz-3.0.0-17-generic
Se encontró una imagen initrd: /boot/initrd.img-3.0.0-17-generic
Se encontró una imagen linux: /boot/vmlinuz-3.0.0-16-generic
Se encontró una imagen initrd: /boot/initrd.img-3.0.0-16-generic
Se encontró una imagen linux: /boot/vmlinuz-3.0.0-12-generic
Se encontró una imagen initrd: /boot/initrd.img-3.0.0-12-generic
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
Encontrado en Windows 7 (loader) en /dev/sda1
Encontrado en Windows 7 (loader) en /dev/sda8
hecho

But when I try to delete one of those entries, I get this:

$ sudo apt-get purge linux-image-3.0.0-12-generic
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias       
Leyendo la información de estado... Hecho
E: No se ha podido localizar el paquete linux-image-3.0.0-12-generic
E: No se pudo encontrar ningún paquete con la expresión regular «linux-image-3.0.0-12-generic»

Basically, it says it doesn't find the package or image I'm trying to delete.

$ dpkg -l linux-image* 
Deseado=Desconocido/Instalar/Eliminar/Purgar/Retener
| Estado=No/Instalado/Config-files/Desempaquetado/Medio-conf/Medio-inst/espera-disparo/pendiente-disparo
|/ Err?=(ninguno)/Requiere-reinst (Estado,Err: mayúsc.=malo)
||/ Nombre                                             Versión                        Arquitectura                   Descripción
+++-==================================================-==============================-==============================-==========================================================================================================
un  linux-image                                        <ninguna>                      <ninguna>                      (no hay ninguna descripción disponible)
un  linux-image-3.0                                    <ninguna>                      <ninguna>                      (no hay ninguna descripción disponible)
ii  linux-image-3.13.0-24-generic                      3.13.0-24.47                   amd64                          Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-extra-3.13.0-24-generic                3.13.0-24.47                   amd64                          Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii  linux-image-generic

PS: is it possible to delete the current kernel or the extras (linux-image-extra-3.13.0-24-generic) and, at the same time, install the newest kernel, all of this using Synaptic?

8
  • Maybe sudo apt-get autoclean or sudo apt-get autoremove?
    – user285324
    May 28, 2014 at 4:04
  • First install new kernel, then remove old. And I suggest you to test new before removing old. Things may occur. If you have room only for one kernel, you did it wrong and have to resize your /boot partition.
    – Danatela
    May 28, 2014 at 4:11
  • @skyroma thanks, already tried that and emptying the Bin, doens't work
    – edoher
    May 28, 2014 at 14:17
  • @Danatela I always could upgrade my kernel, and Ubuntu Tweak would do the trick by deleting old kernels. Now it just seem to have ran out of space and I don't know what to delete to fix this.
    – edoher
    May 28, 2014 at 14:19
  • 1
    Looks like you have a bunch of files that don't belong to any package. Assuming you are currently running 3.13.0, you can just do rm /boot/*-3.0.0-12-generic
    – bain
    May 28, 2014 at 20:10

4 Answers 4

9

Open a terminal (CTRL+ALT+T) and chek the current kernel version:

uname -r

DO NOT REMOVE THIS KERNEL!

Copy and paste below command and hit run to check list of installed Kernels on your system:

dpkg --list | grep linux-image

Find out the kernels you want to remove, and run below command to accomplish it: Change x.x.x.x to the kernel version

sudo apt-get purge linux-image-x.x.x.x-generic
3

Looks like you have a bunch of files that don't belong to any package. Assuming you are currently running 3.13.0, you can just do rm /boot/*-3.0.0-12-generic

1

you could use the following bash script (run as sudo). it purges/removes all 'old' kernels.

#/bin/bash 
ls /boot/ | grep vmlinuz | sed 's@vmlinuz-@linux-image-@g' | grep -v `uname -r` > /tmp/kernelList 
for I in `cat /tmp/kernelList`
do 
  #sudo aptitude remove $I 
  sudo apt-get purge --assume-yes $I
  #echo $I
done
rm -f /tmp/kernelList 
sudo update-grub
0

Since your dpkg listing does not indicate that the packages for the old kernels exist, feel free to just delete the old unwanted files from /boot. Then take a look at /lib/modules, and remove the old module directories there too. Certainly the 3.0.0-12, 16, and 17 may be delete this way, leaving you with enough room for the new kernel.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .