OH3 installation still having OH2 references

Freshly installed OH3, executing ‘sudo apt update’ and receiving package configurations on multiple locations referencing OH2:

[07:18:28] openhabian@openHABianDevice:~$ sudo apt update
Hit:1 http://davesteele.github.io/comitup/repo comitup InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease                                                                                                                    
Hit:3 http://archive.raspberrypi.org/debian buster InRelease                                                                                                                       
Hit:4 https://deb.nodesource.com/node_12.x buster InRelease                                                                                                                        
Hit:5 https://repos.influxdata.com/debian buster InRelease                                                                                                                         
Ign:6 https://dl.bintray.com/openhab/apt-repo2 stable InRelease                                      
Hit:7 https://packages.grafana.com/oss/deb stable InRelease                    
Get:8 https://dl.bintray.com/openhab/apt-repo2 stable Release [6,051 B]
Fetched 6,051 B in 2s (2,448 B/s)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
W: Target Packages (main/binary-armhf/Packages) is configured multiple times in /etc/apt/sources.list.d/openhab.list:1 and /etc/apt/sources.list.d/openhab2.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/openhab.list:1 and /etc/apt/sources.list.d/openhab2.list:1
W: Target Translations (main/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list.d/openhab.list:1 and /etc/apt/sources.list.d/openhab2.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/openhab.list:1 and /etc/apt/sources.list.d/openhab2.list:1
W: Target Translations (main/i18n/Translation-en_GB.UTF-8) is configured multiple times in /etc/apt/sources.list.d/openhab.list:1 and /etc/apt/sources.list.d/openhab2.list:1
W: Target Packages (main/binary-armhf/Packages) is configured multiple times in /etc/apt/sources.list.d/openhab.list:1 and /etc/apt/sources.list.d/openhab2.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/openhab.list:1 and /etc/apt/sources.list.d/openhab2.list:1
W: Target Translations (main/i18n/Translation-en_GB) is configured multiple times in /etc/apt/sources.list.d/openhab.list:1 and /etc/apt/sources.list.d/openhab2.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/openhab.list:1 and /etc/apt/sources.list.d/openhab2.list:1
W: Target Translations (main/i18n/Translation-en_GB.UTF-8) is configured multiple times in /etc/apt/sources.list.d/openhab.list:1 and /etc/apt/sources.list.d/openhab2.list:1

In case you mean

that’s a config file name that you define in your system. You can easily rename it to openhab.list. Thats also the name recommended by the docs: openHAB on Linux | openHAB

as mentioned, it’s a fresh install of OH3 w/o any restore.

Ah, you mean openHABian. As I said, the name of this file is arbitrary. You can rename it to any name you like and everything will still work.

I proposed to rename it as you suggested: Rename openhab2.list to openhab.list by pfink · Pull Request #1323 · openhab/openhabian · GitHub

Anyhow, you can “fix” this on your own in your current installation by just renaming the file.

1 Like

No that’ll result in the same warnings. Just delete the file or ignore the warnings. Nothing wrong with that.

You‘re right, just saw that openhab.list is also present. Then openhab2.list should be deleted, yes.

Before deleting the “duplicate” file, make sure it wash’t distributed in a package:

openhabian@openhab:~ $ ls -la /etc/apt/sources.list.d/openh*
-rw-r--r-- 1 root root 413 Apr 21 21:49 /etc/apt/sources.list.d/openhab-linuxpkg.list
-rw-r--r-- 1 root root  70 May 12 13:17 /etc/apt/sources.list.d/openhab.list
openhabian@openhab:~ $ diff -u /etc/apt/sources.list.d/openh*
--- /etc/apt/sources.list.d/openhab-linuxpkg.list	2021-04-21 21:49:27.000000000 +0200
+++ /etc/apt/sources.list.d/openhab.list	2021-05-12 13:17:13.263852057 +0200
@@ -1,7 +1 @@
-# Provided by the openhab Linux package.
-# There are three repository types:
-## - stable: contains the latest official release with tested features.
-## - testing: contains new features that are currently in the testing phase (milestone and release candidates). 
-## - unstable: contains the latest changes which may be untested or have bugs. 
-
 deb https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main
openhabian@openhab:~ $ dpkg -S /etc/apt/sources.list.d/openhab.list 
dpkg-query: no path found matching pattern /etc/apt/sources.list.d/openhab.list
openhabian@openhab:~ $ dpkg -S /etc/apt/sources.list.d/openhab-linuxpkg.list 
openhab: /etc/apt/sources.list.d/openhab-linuxpkg.list

In my case, I could safely delete /etc/apt/sources.list.d/openhab.list as it is not part of any installed package:

openhabian@openhab:~ $ sudo rm /etc/apt/sources.list.d/openhab.list 
4 Likes