EXPKEYSIG debian ubuntu

Fix EXPKEYSIG F42ED6FBAB17C654

Open Robotics <info@osrfoundation.org> — by Open Robotics

Error message
EXPKEYSIG F42ED6FBAB17C654 Open Robotics <info@osrfoundation.org>

Fix commands for Ubuntu

Method 1 Modern method (Debian 11+ / Ubuntu 22.04+)

The modern approach stores keys in /usr/share/keyrings/ as binary .gpg files and references them per-repository. This avoids the deprecated apt-key ring.

Ubuntu — bash
$ sudo apt-key del AB17C654
$ sudo gpg --keyserver keyserver.ubuntu.com --recv-keys F42ED6FBAB17C654
$ sudo gpg --export F42ED6FBAB17C654 | sudo tee /usr/share/keyrings/AB17C654-archive-keyring.gpg > /dev/null
# Update your sources.list entry to include [signed-by=/usr/share/keyrings/AB17C654-archive-keyring.gpg]
$ sudo apt-get update

Method 2 Legacy apt-key method (Debian 10 / Ubuntu 20.04 and older)

Uses apt-key which is deprecated but still functional on older systems.

Ubuntu — bash
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F42ED6FBAB17C654
$ sudo apt-get update

Method 3 Direct download from official source

Downloads the key directly from the official vendor URL. Preferred when available as it does not rely on keyservers.

Ubuntu — bash
$ sudo curl -fsSL -o /usr/share/keyrings/AB17C654-archive-keyring.gpg https://repo.ros2.org/repos.key
$ sudo apt-get update

After importing the key

Run sudo apt-get update (or your distro's equivalent) again. If successful you should see Hit: lines with no EXPKEYSIG warnings. Still broken? Check that your /etc/apt/sources.list.d/ entry references the correct [signed-by=…] keyring path.