How to fix Expired GPG Key error in antiX Linux

Try first

sudo apt-get update --allow-insecure-repositories && sudo apt-get install antix-archive-keyring --allow-unauthenticated && sudo apt-get upgrade -y --allow-unauthenticated

If that does not work, try

su

apt-get update --allow-insecure-repositories && apt-get install antix-archive-keyring --allow-unauthenticated && apt-get upgrade -y --allow-unauthenticated

If that does not work, try

wget -c http://repo.antixlinux.com/bookworm/pool/main/a/antix-archive-keyring/antix-archive-keyring_20019.5.0_all.deb

sudo dpkg -i antix-archive-keyring_20019.5.0_all.deb

… answer y (yes) when asking.

Configuration file ’/etc/apt/keyrings/antix-archive-keyring.gpg’
==> File on system created by you or by a script.
==> File also in package provided by package maintainer.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer’s version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** antix-archive-keyring.gpg (Y/I/N/O/D/Z) [default=N] ? y
Installing new version of config file /etc/apt/keyrings/antix-archive-keyring.gpg …

Fix can do via script also:

#!/bin/bash
##
#
yad --form --columns=2 --width=800 --title=keyring-fix --text="Expired GPG Key fix:" \
--field="Try keyring fix":fbtn "x-terminal-emulator -e bash -c 'sudo apt-get update --allow-insecure-repositories && sudo apt-get install antix-archive-keyring --allow-unauthenticated && sudo apt-get upgrade -y --allow-unauthenticated; exec bash' & " \
--field="Fix 2 download keyring and install it":fbtn "x-terminal-emulator -e bash -c 'wget -c http://repo.antixlinux.com/bookworm/pool/main/a/antix-archive-keyring/antix-archive-keyring_20019.5.0_all.deb && \
sudo dpkg -i antix-archive-keyring_20019.5.0_all.deb; exec bash' & " \
--button=Exit:1