1

I try to update docker on Debian, with the following command:

sudo apt-get update --allow-releaseinfo-change

But I got the following error message:

Hit:1 http://asi-fs-n.contabo.net/debian buster InRelease
Hit:2 http://asi-fs-n.contabo.net/debian buster-updates InRelease
Hit:3 http://security.debian.org/debian-security buster/updates InRelease
Get:4 https://download.docker.com/linux/debian buster InRelease [54.0 kB]
Hit:5 https://download.docker.com/linux/ubuntu zesty InRelease
Ign:6 https://download.docker.com/linux/ubuntu docker InRelease
Err:7 https://download.docker.com/linux/ubuntu docker Release
  404  Not Found [IP: 13.224.94.87 443]
Reading package lists... Done
E: The repository 'https://download.docker.com/linux/ubuntu docker 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.

From another StackOverflow topic, it seems I must update the file /etc/apt/sources.list.d/docker.list

I tried the following (but it does not work):

deb https://get.docker.io/ubuntu docker main

Noticed that:

Should I change to something like, without corrupting/breaking my operating system?

deb https://download.docker.com/linux/debian docker buster
3
  • 1
    The source url is not okay. I dunno exactly how.
    – peterh
    Sep 7, 2021 at 18:12
  • @peterh Indeed, but I the last url (download.docker.com) seems correct. I just don't know what I must put after. Zesty or buster, I do not really understand what it mean... I do not want to break my operating system. You see? Sep 7, 2021 at 20:53
  • 1
    Docker is written in go, thus it is very distro-independent. Probably even a redhat docker could run on a debian distro. Furthermore, all the linux distros are smart enough: if you install something what you should have not, and then uninstall it, 99.999999% that nothing will happen. That is my sources.list URL for a debian bullseye: deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian bullseye stable
    – peterh
    Sep 8, 2021 at 9:52

3 Answers 3

5

See Install Docker Engine on Debian. Use the following commands:

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" |\
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

The first command will download the gpg key, the second one will adjust your docker.list file.

Then run sudo apt update

1

Create the following file:

$ cat /etc/apt/sources.list.d/docker-ce.list 
deb [arch=amd64] https://download.docker.com/linux/debian buster stable

Then remove any other download.docker.com entries in /etc/apt/sources.list or /etc/apt/sources.list.d/*

0

I had a similar issue on a VM once. The repo for "https://download.docker.com/linux/ubuntu docker" does not exist and needs to be removed. Unsure why it's there.

This worked for me:

  1. open the source list (providing there isn't external source lists):

    sudo nano /etc/apt/sources.list

  2. remove any lines for "ubuntu" as you are on Debian 10 and save

  3. run sudo apt-get update

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.