Después de usar un tiempo Ubuntu, tendrá algunas actualizaciones y entre ellas de Kernel pero después de reiniciar o acceder de nuevo al sistema vemos que en el GRUB existen varias opciones de kernel para iniciar, pero aveces es molesto tener tantas (además de que ocupan un poco de espacio en disco) así que veamos como borrarlas.
Usaremos dos comandos:
sudo dpkg -l |grep linux-image
Este comando nos permite ver cuales y cuantas versiones de kernel tenemos en el sistema
sudo apt-get remove --purge linux-image-2.6.32-22-generic
Comando que nos permite remover (remove) los paquetes y purgarlos (los archivos de configuración son borrados también)
Veamos como :
Primero hay que ver cuantos y cuales kernel hay que borrar, solo hay que prestar atención de no borrar el últimno(nuevo)
Pueden ver que hay 3 kernel de forma linux-image-2.6.32-XX-generic donde XX es el número que nos ayudara a seleccionar el o los kernel a eliminar y linux-image-generic este no lo toquen (necesario para actualizaciones del kernel.).
Usando el comando sudo apt-get remove --purge linux-image-2.6.32-XX-generic
Se borrara el kernel linux-image-2.6.32-21-generic y despues el linux-image-2.6.32-22-generic. Nos pregunta si deseamos continuar [S/n]? S y enter
Remueve el kernel y configuraciones(purge) ademas actualiza el GRUB
y listo
Nota: Después de borrar Pueden usar el startupmanager para asignar que sistema inicia por default en el GRUB
APT
clean
clean clears out the local repository of retrieved package files.
It removes everything but the lock file from
/var/cache/apt/archives/ and /var/cache/apt/archives/partial/. When
APT is used as a dselect(1) method, clean is run automatically.
Those who do not use dselect will likely want to run apt-get clean
from time to time to free up disk space.
autoclean
Like clean, autoclean clears out the local repository of retrieved
package files. The difference is that it only removes package files
that can no longer be downloaded, and are largely useless. This
allows a cache to be maintained over a long period without it
growing out of control. The configuration option
APT::Clean-Installed will prevent installed packages from being
erased if it is set to off.
autoremove
autoremove is used to remove packages that were automatically
installed to satisfy dependencies for some package and that are no
more needed.
Fuente:man APT-GET(8)
Usaremos dos comandos:
sudo dpkg -l |grep linux-image
Este comando nos permite ver cuales y cuantas versiones de kernel tenemos en el sistema
sudo apt-get remove --purge linux-image-2.6.32-22-generic
Comando que nos permite remover (remove) los paquetes y purgarlos (los archivos de configuración son borrados también)
Veamos como :
Primero hay que ver cuantos y cuales kernel hay que borrar, solo hay que prestar atención de no borrar el últimno(nuevo)
Pueden ver que hay 3 kernel de forma linux-image-2.6.32-XX-generic donde XX es el número que nos ayudara a seleccionar el o los kernel a eliminar y linux-image-generic este no lo toquen (necesario para actualizaciones del kernel.).
Usando el comando sudo apt-get remove --purge linux-image-2.6.32-XX-generic
Se borrara el kernel linux-image-2.6.32-21-generic y despues el linux-image-2.6.32-22-generic. Nos pregunta si deseamos continuar [S/n]? S y enter
Remueve el kernel y configuraciones(purge) ademas actualiza el GRUB
y listo
Nota: Después de borrar Pueden usar el startupmanager para asignar que sistema inicia por default en el GRUB
APT
clean
clean clears out the local repository of retrieved package files.
It removes everything but the lock file from
/var/cache/apt/archives/ and /var/cache/apt/archives/partial/. When
APT is used as a dselect(1) method, clean is run automatically.
Those who do not use dselect will likely want to run apt-get clean
from time to time to free up disk space.
autoclean
Like clean, autoclean clears out the local repository of retrieved
package files. The difference is that it only removes package files
that can no longer be downloaded, and are largely useless. This
allows a cache to be maintained over a long period without it
growing out of control. The configuration option
APT::Clean-Installed will prevent installed packages from being
erased if it is set to off.
autoremove
autoremove is used to remove packages that were automatically
installed to satisfy dependencies for some package and that are no
more needed.
Fuente:man APT-GET(8)