1
0
Fork 0
mirror of https://gitlab.com/netravnen/NetworkLabNotes.git synced 2024-12-23 20:57:53 +00:00

Linux chapter: 1st section: upgrading the kernel

This commit is contained in:
netravnen 2017-08-08 13:03:59 +02:00
parent 142e46b51d
commit 292cc891a2

34
chapter/linux.tex Normal file
View file

@ -0,0 +1,34 @@
\chapter{Linux}
\section{Kernel Upgrades}
\begin{txt}
# LIST KERNELS ON /boot PARTITION
dpkg --list | grep linux-image
dpkg --list | grep linux-headers
\end{txt}
\begin{txt}
# REMOVE SELECTED KERNEL VERSIONS FROM BOOT PARTITION
sudo apt-get purge linux-image-4.4.0-{75,78,79}
sudo apt-get purge linux-image-extra-4.4.0-{75,78,79}
sudo apt-get purge linux-headers-4.4.0-{75,78,79}
or
sudo apt autoremove [-f]
\end{txt}
\begin{txt}
# My one-liner to remove old kernels (this also frees up disk space)
# https://askubuntu.com/a/254585
dpkg --list | grep linux-image | awk '{ print \$2 }' | sort -V | sed -n '/'`uname -r`'/q;p' | xargs sudo apt-get -y purge
\end{txt}
\begin{txt}
# Remember to update grub2 configuration
sudo update-grub2
\end{txt}