Skip to content

apt-key is outdated and no longer included in Debian 12 ff. #423

@amarradi

Description

@amarradi

The instructions cause an error during installation
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 2C0D3C0F
sudo: apt-key: command not found

Installing RPi-Monitor on Debian 13 (Trixie) the Secure Way

🧩 Background

Starting with Debian 12 (Bookworm) and continuing in Debian 13 (Trixie),
the classic apt-key command was removed because it trusted all imported
keys system-wide — a major security risk.

The new approach uses dedicated keyrings stored in
/etc/apt/keyrings/ and referenced per repository with
[signed-by=/etc/apt/keyrings/<keyfile>.gpg].

This method isolates each repository’s trust and prevents
malicious or outdated keys from affecting your entire system.


🛠️ Step-by-Step Installation (Debian 13 on Raspberry Pi)

1. Install required tools

bash

sudo apt update
sudo apt install -y gnupg dirmngr ca-certificates curl
sudo mkdir -p /etc/apt/keyrings
sudo chmod 755 /etc/apt/keyrings

We create a temporary GPG home to avoid permission problems, then export the key directly into /etc/apt/keyrings/rpimonitor.gpg.

tmpdir="$(mktemp -d)"
gpg --homedir "$tmpdir" --keyserver hkps://keyserver.ubuntu.com \
    --recv-keys 43A579636E330A99A8336C14E4E362DE2C0D3C0F || \
gpg --homedir "$tmpdir" --keyserver hkp://keyserver.ubuntu.com:80 \
    --recv-keys 43A579636E330A99A8336C14E4E362DE2C0D3C0F

Export the key into the keyrings directory

gpg --homedir "$tmpdir" --export 43A579636E330A99A8336C14E4E362DE2C0D3C0F | \
  sudo tee /etc/apt/keyrings/rpimonitor.gpg >/dev/null
rm -rf "$tmpdir"
sudo chmod 644 /etc/apt/keyrings/rpimonitor.gpg

Add the repository

echo "deb [signed-by=/etc/apt/keyrings/rpimonitor.gpg] http://giteduberger.fr rpimonitor/" | \
  sudo tee /etc/apt/sources.list.d/rpimonitor.list

Installation

sudo apt update
sudo apt install rpimonitor

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions