Hold Linux kernel version in Debian/Ubuntu

April 27, 2023

Sometimes apt accidently upgrades Linux kernel version and changes the Linux kernel development headers, making some kernel modules not work. You can run the following commands to hold the kernel version:

apt-mark hold $(uname -r)