Ir al contenido principal

Elimina tus kernels antiguos

Supongo que muchos de los que useis Linux, al actualizar, habreis actualizado el kernel de linux en alguna ocasion.

Por defecto se guarda una copia de todos los kernels que se han ido teniendo, esto es por que se usaran como arranque de respaldo en caso de el nuevo kernel instalado falle.

Asi, yo por ejemplo me he llegado a juntar con 8 de estos kernels, que ademas molestan en el arranque ya que GRUB los muestra todos en la pantalla de seleccion.

A mi novia el otro dia le quite todos los que le sobraban y conseguimos liberar la friolera de mas de 700 MB, y las consiguientes entradas en el menu de GRUB.

Para quitarlas, debemos ante todo identificar la version del kernel que estamos utilizando actualmente, ya que esa version no la deberemos de quitar (lo estamos usando y lo necesitamos).

Para ello, identificados como root seguiremos estos pasos:

$ uname -r

linux-image-2.6.26-2-789 install


Nos esta diciendo que el kernel que estamos usando actualmente es el linux-image-2.6.26-2-789 install;


Este comando nos devolvera el kernel que estamos usando actualmente. Tomaremos nota de este, ya que no lo debemos eliminar.

Para ver la lista de todos los que tenemos instalados:

$ dpkg --get-selections | grep linux-image

linux-image-2.6-789 install
linux-image-2.6.26-1-789 install
linux-image-2.6.26-2-789 install
inux-image-generic


CUIDADO: ¡¡¡NO desinstales el kernel linux-image-generic ya que es necesario para recibir actualizaciones del kernel!!!

Esto nos mostrara una lista con todos los kernels que tenemos instalados.

Sabiendo que este ejemplo, no debemos de desinstalar el kernel linux-image-2.6.26-2-789 install, ni tampoco debemos de quitar linux-image-generic, ejecutaremos el siguiente comando para el resto de kernels, cambiando en cada llamada el nombre de kernel que corresponda:

$ apt-get remove --purge linux-image-2.6.26-1-686

Y listo, con cada una de las anteriores llamadas estareis eliminando el correspondiente kernel.

Saludos!!

Comentarios

Entradas populares de este blog

Use django ORM standalone within your nameko micro-services

Learning about micro services with python, I found a great tool named nameko . https://www.nameko.io/ Nameko is a Python framework to build microservices that doesn't care in concrete technologies you will use within your project. To allow that microservices to work with a database, you can install into your project a wide variety of third parties, like SQLAlchemy (just like any other). To have an easy way to communicate with the database and keep track of the changes made to the models, I chose Django: I'm just learning about microservices and I want to keep focused on that. Easy to use, Django is a reliable web framework, have a powerful and well known ORM. Also using Django we will have many of the different functionalities that this framework provide. To make all this magic to work together, I developed a python package that allow you to use Django as a Nameko injected dependency: https://pypi.org/project/django-nameko-standalone/ You can found the source ...

Stop python debugger exactly on the failing loop iteration

This post is for ipdb users. Is this case familiar for you?: Write a break point on your code Go into a loop Start pressing 'c' and 'n' until you found the iteration that is failing. It can works, but you can only do this ... one or two times maybe?? If you need to this frequently, this method doesn't works and you need another tool, but .... what's the tool I need? You need launch_ipdb_on_exception ... ... from ipdb import launch_ipdb_on_exception with launch_ipdb_on_exception(): for i in range ( 9 ): print (i) if i== 4 : raise Exception('Debug time!') ... # Output 0 1 2 3 4 Exception('Debug time!',) > <ipython-input-1-4f44dca149ad>(7)<module>() 5 print(i) 6 if i==4: ----> 7 raise Exception('Debug time!') ipdb> i # Note ipdb console!! 4 ipdb> c # Continues the execution In [2]: i # Ipython console again Out[2]: 4 In [3...

Stop measuring time with time.clock() in Python3

If we read the time.clock() documentation ( https://docs.python.org/3/library/time.html#time.clock): Deprecated since version 3.3: The behaviour of this function depends on the platform: use perf_counter() or process_time() instead, depending on your requirements, to have a well defined behaviour. I use time.perf_counter, but feel free to use time.process_time if fits for your requirements. The main difference they have are: time.perf_counter() It does include time elapsed during sleep and is system-wide. time.process_time() It does not include time elapsed during sleep. It is process-wide by definition.