Problem updating Grafana in a Debian 9

Updating a Debian 9 I get this error with the “grafana” update:

$ apt update
...
Ign:7 https://packagecloud.io/grafana/stable/debian stretch InRelease
Err:9 https://packagecloud.io/grafana/stable/debian stretch Release
404 Not Found
Reading package lists... Done
E: The repository 'https://packagecloud.io/grafana/stable/debian stretch Release' does no longer 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.
...

To solve this problem you can follow the next steps.

First, install the “software-properties-common” library:

$ sudo apt-get install -y software-properties-common

Install the repository for stable releases:

$ sudo add-apt-repository "deb https://packages.grafana.com/oss/deb stable main"

Add the gpg key:

$ sudo wget -q -O - https://packages.grafana.com/gpg.key | apt-key add -

Remove the old repository file:

$ sudo rm /etc/apt/sources.list.d/grafana_stable.list

Now you can update the repo correctly:

$ sudo apt update

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.