How to remove the "Restore the previous version of Jenkins" notification at the "Manage Jenkins" page?

Hello Friends

For Jenkins 2.555.3 LTS when I arrive to the Manage Jenkins page appears the following message:

Restore the previous version of Jenkins Downgrade to 2.555.2

Just being curious

Question

  • How to remove the Restore the previous version of Jenkins notification at the Manage Jenkins page?

Thanks in advance

There is a jenkins.war.bak somewhere around. Delete that and the message will disappear.

Thanks for the reply

There is a jenkins.war.bak somewhere around. Delete that and the message will disappear.

Yes, in the same directory where is located the jenkins.war (100MB) file there are two files as:

  • jenkins.war.bak (100MB)
  • jenkins.war.tmp (100MB)

I confirmed you solution and works, thanks again, just being curious.

Questions

  1. Is safe delete the jenkins.war.tmp file?
  2. Was the jenkins.war.tmp file created of the old or new release?

Thanks in advance

Can this be achieved via UI? Basically a button that says “Discard previous version”? I have to connect via SSH every time in order to delete the backup and temporary file. Would be great if there was a button in the UI similar to “Restart after update”.

I think you can achieve this in several ways. Question is if this should be automatically done or not.
When run as a service on linux add a ExecStartPre command that removes the bak file on startup (or with a ExecStartPost to clean on shutdown)
When the controller has executors create a small freestyle job that deletes the file
when the controller has no executors create a pipeline script that deletes the file (the script must not use the sandbox and requires admin approval). That script can also be run as an init.groovy script on startup

Those are good points, thank you. I am restarting Jenkins from the UI. As far as I can see SystemD is not involved and it looks like the service kept running all the time. I restarted it from UI and systemctl still shows “3 days ago” in the “Active” line. Thus ExecStartPre and Post are not called.
Jobs and scripts would also be a solution, sure. I will take a look. I would just find it convenient if there was a button besides “Downgrade to …” that says “Remove backup” or “Remove old version”. Sorry, I know, I sound like a consumer here :slight_smile:

The question is, why you want to remove it at all? It is there so that you can easily downgrade again if e.g. a plugin is not yet compatible.

Good point. It is a small installation and after a small testing period (basically running all builds once) I would like to get rid of the message. And as I am doing everything from the UI now (like updating plugins and running the dist upgrade) I would also like to do that from there. Sure, I have SSH access and can do it as a scheduled task or from the command line. It would just be nice to be able to do it in the UI as well. But it is in no way critical. Thanks for taking time to respond and discuss this!