Hello folks. After installed the kernel 18.104.22.168 and verified that everything is working very well, we can now remove the old kernels.
Open a shell and run the script bellow:
sudo dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed 's/-[^0-9].*//';"s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge
If you have more than one system operational, type:
The command above will remove the old kernels from the grub list.
This script I found on the net some time ago and I am sharing with all of you. It works very well.
That’s it. See you next time.