No update for 11.2 available / apt source and key disappeared

Hi, I am still on YunoHost 11.1.21.4 (stable) and with no updates for 11.2 when I check. Is this normal at the moment? Thanks

Nope, let’s check sudo apt policy yunohost to investigate

Thanks, Aleks!
Here’s the output from the command

yunohost:
  Installed: 11.1.21.4
  Candidate: 11.1.21.4
  Version table:
 *** 11.1.21.4 100
        100 /var/lib/dpkg/status

It looks like somehow you don’t have any apt repositories configured for YunoHost … Let’s look at sudo grep -nr yunohost /etc/apt/sources.list*

It gives me a blank response, as in nothing.
I FTPed into my server and found sources.list and sources.list~ files.
When I open sources.list, this is what the file contains

# deb cdrom:[Debian GNU/Linux 11.5.0 _Bullseye_ - Official amd64 NETINST 20220910-10:38]/ bullseye main

#deb cdrom:[Debian GNU/Linux 11.5.0 _Bullseye_ - Official amd64 NETINST 20220910-10:38]/ bullseye main

deb http://deb.debian.org/debian/ bullseye main
deb-src http://deb.debian.org/debian/ bullseye main

deb http://security.debian.org/debian-security bullseye-security main
deb-src http://security.debian.org/debian-security bullseye-security main

# bullseye-updates, to get updates before a point release is made;
# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
deb http://deb.debian.org/debian/ bullseye-updates main
deb-src http://deb.debian.org/debian/ bullseye-updates main

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.

Well for some reason that file disappeared then … I don’t think it magically happened, don’t you remember tweaking it …?

I think I may have a long time ago but I don’t remember. So, is there anything I can do now to fix it?

Yes, use a valid sources.list. You can edit it with command apt edit-sources with root user (or sudo)

here is mine to help you:

# 

# deb cdrom:[Debian GNU/Linux 9.13 _Buster_ - Unofficial amd64 CD Binary-1 20200731-16:54]/ bullseye main non-free

#deb cdrom:[Debian GNU/Linux 9.13 _Buster_ - Unofficial amd64 CD Binary-1 20200731-16:54]/ bullseye main non-free

deb http://ftp.debian.org/debian bullseye main contrib
deb-src http://ftp.debian.org/debian bullseye main contrib

## YunoHost repository
deb http://forge.yunohost.org/debian/ bullseye stable

deb http://security.debian.org/debian-security bullseye-security main contrib non-free
deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free

# bullseye-updates, previously known as 'volatile'
deb http://ftp.debian.org/debian bullseye-updates main contrib non-free
deb-src http://ftp.debian.org/debian bullseye-updates main contrib non-free

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.

Thanks! I tried it out and got this error

Warning: W: GPG error: http://forge.yunohost.org/debian bullseye InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY FDBB9F3D83BD9E70
Warning: E: The repository 'http://forge.yunohost.org/debian bullseye InRelease' is not signed.
Error: Unable to update the cache of APT (Debian's package manager). Here is a dump of the sources.list lines, which might help identify problematic lines:
sources.list:deb http://ftp.debian.org/debian bullseye main contrib
sources.list:deb-src http://ftp.debian.org/debian bullseye main contrib
sources.list:deb http://forge.yunohost.org/debian/ bullseye stable
sources.list:deb http://security.debian.org/debian-security bullseye-security main contrib non-free
sources.list:deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free
sources.list:deb http://ftp.debian.org/debian bullseye-updates main contrib non-free
sources.list:deb-src http://ftp.debian.org/debian bullseye-updates main contrib non-free
sources.list.d/extra_php_version.list:deb https://packages.sury.org/php/ bullseye main

Add the key:

sudo apt-key adv --keyserver pgpkeys.mit.edu --recv-key FDBB9F3D83BD9E70

Thanks for your help!
I tried to run the cmd and got this error

Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.LPRbcu357y/gpg.1.sh --keyserver pgpkeys.mit.edu --recv-key FDBB9F3D83BD9E70
gpg: keyserver receive failed: No keyserver available

I also ran gpg --keyserver pgpkeys.mit.edu --recv-key FDBB9F3D83BD9E70 and got the same error message :frowning:

try this:

wget -O- https://forge.yunohost.org/yunohost.asc -q | apt-key add -qq - >/dev/null 2>&1

source:

Can you confirm @Aleks ?

Yes, though it’s quite mysterious that both the apt source entry and the yunohost’s apt key magically disappeared from the server …

It runs the command but still gives me the same error :frowning:

I remember the only command I ran to update issues in the past was sudo apt-get --allow-releaseinfo-change update. Not sure if this would have deleted the keys.

Your installation doesn’t seem to be standard, so i can’t help you much. Sorry.

No worries, I really appreciate your help :slight_smile:
Just one question, is there a way (or what’s the best way) for me to reinstall Yunohost on the same machine?

Make a backup with yunohost for all configurations and all apps. When you install, restore the backup instead of post-install.

If you use a yunohost domain like .ynh.fr, nohost.me or noho.st, you can set a recovery password. If you backup all configurations, it’s not necessary but it’s safer in case you need it. You can do that with this command:

yunohost domain dyndns set-recovery-password

Thank you! One final question. Would you recommend following the steps in the docs or is there a command I can run on my current machine to reinstall Yunohost?

Yes, you can follow the doc. When the install is finish but before the post-install, you copy your backup in /home/yunohost.backup/archives, and after that you can list it with:

yunohost backup list

You can restore it with (replace name with the archive name given by the previous command):

yunohost backup restore name