Blocking Specific Kernel Updates
To lock a package from being installed, updated or removed, we can use the apt-mark command.
To lock a package from being installed, updated or removed, we can use the apt-mark command.
sudo apt-mark hold linux-image-$(uname -r)
sudo apt-mark hold linux-headers-$(uname -r)
disable auto-upgrades
prune journalctl
sed -i -e 's/Update-Package-Lists \"1/Update-Package-Lists \"0/g' /etc/apt/apt.conf.d/20auto-upgrades
prune journalctl
echo "SystemMaxUse=500M" >> /etc/systemd/journald.conf && journalctl --vacuum-size=500M && journalctl --vacuum-time=10d && systemctl restart systemd-journald.service