# How find previous Jenkins version after unintentional upgrade?

**URL:** <https://community.jenkins.io/t/how-find-previous-jenkins-version-after-unintentional-upgrade/2853>\
**Category:** Using Jenkins\
**Tags:** question\
**Created:** [June 28, 2022, 8:06am UTC](https://community.jenkins.io/t/how-find-previous-jenkins-version-after-unintentional-upgrade/2853 "2022-06-28T08:06:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![blay](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@blay](https://community.jenkins.io/u/blay)\
**Post date:** [June 28, 2022, 8:06am UTC](https://community.jenkins.io/t/how-find-previous-jenkins-version-after-unintentional-upgrade/2853/1 "2022-06-28T08:06:41Z")

</div>

Hi  
Our jenkins instance got upgraded somehow overnight! (Yeah I know, sounds stupid.)  
We want to roll back to previous version - but not sure what it was.  
Will it be in some logs somewhere?

Also we can’t currently log in - although not sure whether we need to at this stage - due to something like:

> <https://stackoverflow.com/questions/68461013/jenkins-update-2-289-login-error-http-error-403-no-valid-crumb-was-included-in>

cheers  
ben

---

<div class="post-metadata">

**Author:** ![blay](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@blay](https://community.jenkins.io/u/blay)\
**Post date:** [June 28, 2022, 8:18am UTC](https://community.jenkins.io/t/how-find-previous-jenkins-version-after-unintentional-upgrade/2853/2 "2022-06-28T08:18:03Z")

</div>

We just rolled back to a guessed earlier version. When we did the login difficulty was resolved. In fact Jenkins still considered me to be logged in.

---

<div class="post-metadata">

**Author:** ![Ian\_W](https://avatars.discourse-cdn.com/v4/letter/i/cab0a1/32.png) [@Ian\_W](https://community.jenkins.io/u/Ian_W)\
**Post date:** [June 28, 2022, 9:49am UTC](https://community.jenkins.io/t/how-find-previous-jenkins-version-after-unintentional-upgrade/2853/3 "2022-06-28T09:49:47Z")

</div>

A reasonable “fallback” mechanism to find the prior version, if done via “Upgrade Automatically” ( the classic “oops”), is to examine the war file location. The prior `jenkins.war` file should have been renamed to `jenkins.war.bak`.

You can either find the SHA:  
`sha256sum jenkins.war.bak`  
and look that up in the [Past Releases](https://get.jenkins.io/war-stable/), or you can run this:  
`jar -tf jenkins.war.bak | grep jenkins-core`  
and the resulting number will be the release.

---

<div class="post-metadata">

**Author:** ![blay](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@blay](https://community.jenkins.io/u/blay)\
**Post date:** [June 28, 2022, 10:43am UTC](https://community.jenkins.io/t/how-find-previous-jenkins-version-after-unintentional-upgrade/2853/4 "2022-06-28T10:43:02Z")

</div>

Thanks! Sounds good. I think the guy handling the problem reinstated the old jenkins from the .bak  
So I guess in the end we didn’t actually need to know the version upfront.  
ben
