# What is the solution to upgrade a jenkins instance

**URL:** <https://community.jenkins.io/t/what-is-the-solution-to-upgrade-a-jenkins-instance/2428>\
**Category:** Ask a question\
**Created:** [May 16, 2022, 1:55am UTC](https://community.jenkins.io/t/what-is-the-solution-to-upgrade-a-jenkins-instance/2428 "2022-05-16T01:55:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![paste](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/paste/32/1488_2.png) [@paste](https://community.jenkins.io/u/paste)\
**Post date:** [May 16, 2022, 1:55am UTC](https://community.jenkins.io/t/what-is-the-solution-to-upgrade-a-jenkins-instance/2428/1 "2022-05-16T01:55:29Z")

</div>

I initially installed the jenkins version 2.176.3 by downloaded the RPM package and used “yum install jenkins.2.176.3.rpm.package” to install it in a Centos 7.x server.

And after the initially installation, I upgraded the jenkins instance by replace the jenkins.war package in /usr/lib/jenkins several times, and now the version of the running jenkins instance is 2.303.3,

Currently, I want to upgrade the 2.303.3 version to a higher version, but when I use the previous method (replace a war package), the jenkins can’t start up.

If I want to upgrade it. what’s the best solution to do it? Can I try to download the lastest rpm package and use “yum update latest.rpm.package” to do the upgrade? Or any other better methods?

---

<div class="post-metadata">

**Author:** ![halkeye](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/halkeye/32/8_2.png) [@halkeye](https://community.jenkins.io/u/halkeye)\
**Post date:** [May 16, 2022, 5:42am UTC](https://community.jenkins.io/t/what-is-the-solution-to-upgrade-a-jenkins-instance/2428/2 "2022-05-16T05:42:05Z")

</div>

> [@paste](#):
>
> Or any other better methods?

better than yum upgrade? using system package managers is the recommended solution.

---

<div class="post-metadata">

**Author:** ![MarkEWaite](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/markewaite/32/20_2.png) [@MarkEWaite](https://community.jenkins.io/u/MarkEWaite)\
**Post date:** [May 17, 2022, 12:35am UTC](https://community.jenkins.io/t/what-is-the-solution-to-upgrade-a-jenkins-instance/2428/3 "2022-05-17T00:35:23Z")

</div>

I agree with @halkeye . Use the system package manager (yum, dnf, zypper, apt, etc.) to perform the upgrade.

I also recommend reading the upgrade guide. It describes the changes in the release and helps you prepare for the upgrade. The Jenkins 2.332.1 upgrade notes that the Linux installation switched from System V `init` to `systemd`.

> **[Upgrading to Jenkins LTS 2.332.x](https://www.jenkins.io/doc/upgrade-guide/2.332/#upgrading-to-jenkins-lts-2-332-1)**
>
> Jenkins – an open source automation server which enables developers around the world to reliably build, test, and deploy their software

---

<div class="post-metadata">

**Author:** ![paste](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/paste/32/1488_2.png) [@paste](https://community.jenkins.io/u/paste)\
**Post date:** [May 17, 2022, 1:07am UTC](https://community.jenkins.io/t/what-is-the-solution-to-upgrade-a-jenkins-instance/2428/4 "2022-05-17T01:07:33Z")

</div>

Thanks halkeye and MarkEWaite for your help.  
I have one more question is: I use war package replacement from version 2.176.3 to the current version 2.303.3. If I upgrade the current version 2.303.3 to the latest version by yum, I mean, they are two diffirent method, does it impact or affect the upgrade to the latest by yum? May the previous replacement cause the yum upgrade fail?  
Thanks in advance for your answer.

---

<div class="post-metadata">

**Author:** ![MarkEWaite](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/markewaite/32/20_2.png) [@MarkEWaite](https://community.jenkins.io/u/MarkEWaite)\
**Post date:** [May 17, 2022, 1:55am UTC](https://community.jenkins.io/t/what-is-the-solution-to-upgrade-a-jenkins-instance/2428/5 "2022-05-17T01:55:54Z")

</div>

> [@paste](#):
>
> May the previous replacement cause the yum upgrade fail?

I don’t know how `yum` handles unexpected changes to files that it includes in the package.

Modifying a binary file provided by a Linux package manager outside the package manager is not a common technique. I suspect the package manager will ignore the changes and update the `jenkins.war` file, but I have not tried it.

---

<div class="post-metadata">

**Author:** ![devops1](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@devops1](https://community.jenkins.io/u/devops1)\
**Post date:** [October 19, 2022, 10:44pm UTC](https://community.jenkins.io/t/what-is-the-solution-to-upgrade-a-jenkins-instance/2428/6 "2022-10-19T22:44:22Z")

</div>

I have a similar issue, trying to upgrade old pkg, but not able to with sudo yum upgrade!!

How can I remove or upgrade old pkg version, without affecting current latest version of Jenkins?

thank you.
