I'm currently running the Jenkins weekly Ubuntu package from https://jenkins.io/download/ on Ubuntu 14.04. Specifically I'm on Jenkins 2.138 (the latest) from https://pkg.jenkins.io/debian/.

I'd like to migrate from the weekly to the more stable LTS release line. I'd like to wait until a new LTS release that's newer than our current weekly version (2.138) comes out, upgrade to that, and then stay on the LTS release line.

How can I orchestrate this migration without losing anything?

I wasn't able to find a Jenkins weekly → LTS migration guide for people who have Jenkins installed from the jenkins.io Debian/Ubuntu packages (they all seem to refer to the jenkins.war version).

We currently have deb http://pkg.jenkins-ci.org/debian binary/ listed in /etc/apt/sources.list.d/pkg_jenkins_ci_org_debian.list (pkg.jenkins-ci.org seems to be a mirror of pkg.jenkins.io). Would it be enough to simply edit that file, changing it to deb https://pkg.jenkins.io/debian-stable binary/ (that is: changing the weekly apt URL to the stable/LTS one), and then run sudo apt-get update && sudo apt-get install --only-upgrade jenkins?


Your plan of action: changing the repository, and then running apt-get update will work assuming: the name of the package, jenkins is the same in both repositories. It shouldn't be hard to check this.

Other than that: I would make the following recommend the following

  1. Make sure you make a backup of your server before starting this.
  2. If you have a test server you can run a practice migration first, I would highly recommend it.

Alternative: You can use apt-mark hold jenkins to hold the jenkins package at some point, and it won't upgrade unless you unhold it apt-mark unhold jenkins. This way to you hold yourself on a 'stable' release until you are ready to upgrade.

  • I finally got round to following this procedure and it seemed to work perfectly, thanks! – Sean Hammond Oct 24 '18 at 10:39

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.