# Package list isn't refreshed on server due to "NO_PUBKEY" not being available

**Project:** Servers | **Votes:** 1
**URL:** https://roadmap.ploi.io/projects/1-server-level-requests/items/1677-package-list-isnt-refreshed-on-server-due-to-no-pubkey-not-being-available

---

I had a Jammy 22.x Ubuntu server which didn't upgrade to latest 1.30.7 patch. Looking into it a public key on the server sometime in history wasn't refreshed correctly so the server was still using a package list from ~2024 (see below). Can this be automated to check if the package list is the latest one and if not "fix it"?

```
Hit:4 http://eu-north-1c.clouds.ports.ubuntu.com/ubuntu-ports jammy InRelease
Get:5 https://nginx.org/packages/ubuntu jammy InRelease [4025 B]
Hit:6 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy InRelease
Hit:7 http://eu-north-1c.clouds.ports.ubuntu.com/ubuntu-ports jammy-updates InRelease
Hit:8 http://eu-north-1c.clouds.ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
Err:5 https://nginx.org/packages/ubuntu jammy InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2FD21310B49F6B46
Fetched 4025 B in 1s (4256 B/s)
--
11 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://nginx.org/packages/ubuntu jammy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2FD21310B49F6B46
W: Failed to fetch https://nginx.org/packages/ubuntu/dists/jammy/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2FD21310B49F6B46
W: Some index files failed to download. They have been ignored, or old ones used instead.
```
