2

I have unattended upgrades installed, and it does job well, updating all the packages (except for kernel). When I run sudo apt-get upgrade it returns:

The following packages have been kept back:
linux-generic linux-headers-generic linux-image-generic

I can manually run dist-upgrade to update the kernel. However, I'm looking into automating this too. Can unattended upgrades also do dist-upgrade or I need to look for alternatives?

Edit: As suggested by @michal-przybylowicz, I have checked whether APT was holding packages, but all three return was already not hold.

  • Unattended-upgrades already does kernel updates. Somehow you have disabled it by preventing the kernel metapackges from updating. Any idea how you managed that? There are several possibilities, each is undone a different way. – user535733 Jul 26 '17 at 23:40
  • @user535733 This is a new VPS with 16.04, I haven't manually done anything yet. Also found this, someone said it is expected behaviour to use dist-upgrade to update kernel packages. – Ilya Jul 27 '17 at 5:14
  • If you "haven't manually done anything yet", then what do the unattended-upgrade logs say? Are you waiting a full cycle for u-u to run? Using dist-upgrade is correct when you run apt manually, which is a different case. – user535733 Jul 29 '17 at 19:12
4

You need to unhold these packages with this apt-mark command:

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

Then You can run sudo apt-get upgrade again.

| improve this answer | |
  • Hey, thanks for your answer, but when I run it says linux-generic was already not hold. and similarly for other two packages. – Ilya Jul 26 '17 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.