[HOWTO] apt-get downgrade from broken 2.5.0 SNAPSHOT to 2.5.0~M1-1

I just, inadvertently, upgraded to the broken 2.5.0 SNAPSHOT.
I did briefly check the forum and GitHub, but didn’t catch the currently broken state.
Should this fact be made a sticky announcement?

Luckily I was alone at home, so panic only hit a 2 on a scale to 10.
Even so, downgrade clues from SNAPSHOT to 2.5.0~M1-1 had to be collected from various sources, as I was not too familiar with where ‘the usual’ places to find things were.

Since I joined Feb. 2017 I have upgraded to the SNAPSHOT almost weekly without any major problems. Kudos to the hard working OH2 team!

Here are the steps I performed on order to recover. (Ubuntu, using apt-get)

  1. Edit /etc/apt/sources.list.d/openhab2.list
    $ sudo nano /etc/apt/sources.list.d/openhab2.list

    #deb http://openhab.jfrog.io/openhab/openhab-linuxpkg unstable main
    deb https://dl.bintray.com/openhab/apt-repo2 testing main

Note the https!

wget -qO - 'https://bintray.com/user/downloadSubjectPublicKey?username=openhab' | sudo apt-key add -
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install openhab2=2.5.0~M1-1

Hope this will help some other with a slight sweat about to break out.

5 Likes

For anyone else that may be looking to downgrade from a snapshot to stable see this post.

Had a similar issue, I’m at openHAB 2.5.0 Build #1568
Noob here.
How do I downgrade if running on a RasPi?

I’ve only used the openhabian-config tool to update before?

Thanks for any help.

You can use the openhabian-config tool to downgrade ( or move to the latest stable version as they call it) or follow the same directions as the link in my post above.

Thanks

I tried from the post above and I must be missing something simple?

[07:42:11] openhabian@openHABianPi:~$ sudo apt-get install openhab2=2.5.0~M1-1
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '2.5.0~M1-1' for 'openhab2' was not found

And I’m not running Ubuntu, I’m running on a RasPi?

And I just looked at the config tool and it states the following?
image

Try using the command below, then the install.

echo 'deb https://dl.bintray.com/openhab/apt-repo2 testing main' | sudo tee /etc/apt/sources.list.d/openhab2.list

I tried that and got the following:

[07:55:20] openhabian@openHABianPi:~$ echo 'deb https://dl.bintray.com/openhab/apt-repo2 testing main' | sudo tee /etc/apt/sources.list.d/openhab2.list
deb https://dl.bintray.com/openhab/apt-repo2 testing main
[08:00:52] openhabian@openHABianPi:~$ sudo apt-get install openhab2=2.5.0~M1-1
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '2.5.0~M1-1' for 'openhab2' was not found

???

Any ideas

Sorry, I forgot to mention that an sudo apt-get update and sudo apt-get upgrade is needed before the install.

EDIT: Try with only the update first and see if that will work. After the update use apt-cache showpkg openhab2 to show a list of available packages to choose from.

Thanks allot that worked

1 Like

Another question, after the successful downgrade, now I’m getting the following error?

2019-04-14 09:43:44.552 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-ui-restdocs'

?

Look here