apt – Error about missing release file for NGINX

I previously had Ondrej NGINX installed, but needed to remove it, as per this question:

Unable to remove Ondrej NGINX

Then I followed the official NGINX installation notes here:

nginx.org/en/linux_packages.html#Ubuntu

But there is still an error when I run apt update:

E: The repository 'https://ppa.launchpadcontent.net/nginx/stable/ubuntu noble Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I checked and the nginx.list file is there and has the correct contents. Why would there still be an update error?

I also tried the suggestion with the nginx.sources file at:

Missing Release file for NGINX PPA on Ubuntu 24.04 Noble

But upon running apt update the following error is produced instead:

E: Conflicting values set for option Signed-By regarding source https://nginx.org/packages/ubuntu/ noble: /usr/share/keyrings/nginx-archive-keyring.gpg != /etc/apt/keyrings/nginx-archive-keyring.gpg
E: The list of sources could not be read.

I have no idea where the /usr/share/keyrings/nginx-archive-keyring.gpg reference is coming from. The file just contains the following:

Types: deb
URIs: http://nginx.org/packages/ubuntu
Suites: noble
Components: nginx
Architectures: amd64
Signed-By: /etc/apt/keyrings/nginx-archive-keyring.gpg

Read more here: Source link