Undoing effect of adding a Ubuntu-intended repository and updating on Debian

tl;dr

How do I fix this error on Debian

E: The repository 'https://deb.nodesource.com/node_current.x nodistro 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.

if the mistake was to run this

sudo add-apt-repository ppa:agornostal/ulauncher -y && sudo apt update

which was intended for Ubuntu?

Full story

I wanted to install ulauncher on a Debian 11 machine, so I looked for the instruction Ubuntu (Debian) at the linked page, and run the command

sudo add-apt-repository universe -y && sudo add-apt-repository ppa:agornostal/ulauncher -y && sudo apt update && sudo apt install ulauncher

which failed, because that was for Install via PPA (Ubuntu), which I hadn’t read, as Ubuntu (Debian) above had tricked me into thinking the instructions were common (I’m normally a ArchLinux user, so I’m not that used anymore to installing stuff on Ubuntu or Debian).

The error was simply

Error: 'universe' invalid

so I tried executing

sudo add-apt-repository ppa:agornostal/ulauncher -y && sudo apt update && sudo apt install ulauncher

which failed with

E: The repository 'http://ppa.launchpad.net/agornostal/ulauncher/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.
E: The repository 'https://deb.nodesource.com/node_current.x nodistro 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.

That’s when I read the instructions more carefully, discovering that on Debian I should have executed these commands

sudo apt update && sudo apt install -y gnupg
gpg --keyserver keyserver.ubuntu.com --recv 0xfaf1020699503176
gpg --export 0xfaf1020699503176 | sudo tee /usr/share/keyrings/ulauncher-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/ulauncher-archive-keyring.gpg] 
          http://ppa.launchpad.net/agornostal/ulauncher/ubuntu jammy main" 
          | sudo tee /etc/apt/sources.list.d/ulauncher-jammy.list
sudo apt update && sudo apt install ulauncher

so I tried that, but the error was still the same as above, so I understood I needed somehow to undo my first, intended-for-Ubuntu attempt. I tried this:

sudo add-apt-repository -r ppa:agornostal/ulauncher

so the first command from the Debian-specific instructions

sudo apt update && sudo apt install -y gnupg

still errors, but a bit less:

E: The repository 'https://deb.nodesource.com/node_current.x nodistro 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.

How do I fix this?

Asked By: Enlico

||

As Marcus Müller says, the error you’re left with doesn’t seem to be related to your Ulauncher installation.

To fix the error, you can either:

  • keep the Node.js repository, and add its key — follow the Node.js instructions:

    curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key |
    sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
    
  • or remove the repository:

    rm /etc/apt/sources.list.d/nodesource.list
    

    (assuming the repository is defined in that file).

Answered By: Stephen Kitt
Categories: Answers Tags: , , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.