linux remove old kernels

Recently Ubuntu-based linux SO doesn’t remove automatically old kernels, with the command

sudo apt-get autoremove --purge

This because kernels, even automatically installed, are considered manually installed, and so they are not automatically removed.

To solve this, you should do beforehand this command

sudo apt-mark auto $(apt-mark showmanual | grep -E "^linux-([[:alpha:]]+-)+[[:digit:].]+-[^-]+(|-.+)$")

With this command you say that all kernels are automatically installed, and therefore the previuous command (sudo apt-get autoremove –purge) will work.

nvidia grafical card and linux kernel

It could happen that a new kernel doesn’t work with your nvidia (geforce) grafical card. The problem could de the linux-modules, such as linux-modules-nvidia-460-5.8.0-53-generic.

You can check it by the following command

dpkg --list | egrep -i --color 'linux-image|linux-headers|linux-modules' | awk '{ print $2 }'

To solve this, if you find that the last kernel does’t have a matchintg nvidia module, you have to install manually that module

sudo apt-get install linux-modules-nvidia-460-5.8.0-53-generic

import an xml into phpmyadmin

Given that WordPress doesn’t allow to import a local file (and this is quite unfair, in my opinion), you can transform a wp site into a xml file and then import it in your local database via phpmyadmin.

But you have to format carefully the xml: look how phpmyadmin export an xml file and format your xml according to that model.