The issue here is that in both examples you are using the wrong package name:
sudo apt install linux-generic-hwe.16.04 /usr/bin/apt-get --quiet --assume-yes \ --option=Dpkg::options::=--force-unsafe-io \ --option=Dpkg::Options::=--force-confold \ install linux-generic-hwe.16.04 The correct package name is linux-generic-hwe-16.04. By using a non- existant package but using regular-expression characters (.) you are triggering pattern match mode. Apt even tells you this in your manual update: Note, selecting 'linux-generic-hwe-16.04-edge' for regex 'linux-generic-hwe.16.04' Note, selecting 'linux-generic-hwe-16.04' for regex 'linux-generic-hwe.16.04' -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1666413 Title: linux-image-hwe-16.04 depends on linux-generic-hwe-16.04-edge Status in linux package in Ubuntu: Invalid Status in linux source package in Xenial: In Progress Bug description: Installing the linux-generic-hwe-16.04 package pulls in linux-generic- hwe-16.04-edge, thus the system has linux-image-4.8.0-34-generic and linux-image-4.8.0-36-generic installed. The system then boots to 4.8.0-36. Installing linux-generic-hwe-16.04 shouldn't pull in linux-generic- hwe-16.04-edge and only one kernel should be installed. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1666413/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp