Upgrade Ubuntu without Updating the Kernel

From Bonus Bits
Jump to: navigation, search

Purpose

This article gives the steps to upgrade all the apt-get packages without updating the kernel on Ubuntu CLI.


Environment

  • Ubuntu 14/15


Single Line

The sleep is to give a little time for the lock file to release after updating.

sudo apt-mark hold linux-image-generic linux-headers-generic && sudo apt-get update && sleep 1 && sudo apt-get upgrade -y && sudo apt-mark unhold linux-image-generic linux-headers-generic


Disable Kernel Updates

sudo apt-mark hold linux-image-generic linux-headers-generic


Updates Apt-Get Local DB

sudo apt-get update


Install Upgrades

sudo apt-get upgrade -y


Enable Kernel Updates

sudo apt-mark unhold linux-image-generic linux-headers-generic


Related Articles


Sources