2023-10-18 12:54:50 +00:00
|
|
|
% !TeX TS-program =
|
|
|
|
% !TeX spellcheck = en_DK
|
|
|
|
% !TeX encoding = UTF-8
|
|
|
|
% !TeX root = ../main.tex
|
|
|
|
|
2017-08-08 11:03:59 +00:00
|
|
|
\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}
|