We are just now experiencing this issue with upgrades from the official jenkins-ci.org repo. After upgrading one of our staging environments, we moved on our production server, only to find out the jenkins package has been kept back.
root@deployer-dev:~# apt-get update
### previous/unrelated lines removed for brevity
Ign http:Hit http:Hit http:Hit http:Hit http:Ign http:Ign http:Reading package lists... Done
root@deployer-dev:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
We've tried several apt-get commands to force the upgrade
$ apt-get dist-upgrade
$ apt-get dist-upgrade jenkins
$ apt-get upgrade jenkins
$ apt-get install --reinstall jenkins
... but the package just won't install. We know that it can be manually and easily be upgraded, but we'd rather use the standard apt-get upgrade process we've always used in the past for consistency.
The new version is listed, but it won't upgrade.
root@deployer-dev:~# apt-cache policy jenkins
500 http: *** 2.52 0
We've also managed to upgrade all other linux packages on this machine, except Jenkins. Some more info about this particular server:
$ root@deployer-dev:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
$ uname -a
Linux deployer-dev 3.13.0-116-generic #163-Ubuntu SMP Fri Mar 31 14:13:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Oddly enough, one of our staging environments is running Ubuntu 16.04 LTS, where the upgrade worked normally.
Would it be possible to provide any clues to resolve this?