18

I recently try to install docker using this method

curl -fsSL get.docker.com -o get-docker.sh
sh get-docker.sh

but it doesn't worked for me maybe broken packages or something after that I installed docker && docker compose using apt method and that's working good but when I try to update or upgrade my system I can see following messages I don't actually know what was the issue please give me a solution thanks.

$ sudo apt-get update

Hit:1 http://ppa.launchpad.net/daniruiz/flat-remix/ubuntu bionic InRelease
Hit:2 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease                                    
Hit:3 http://security.ubuntu.com/ubuntu bionic-security InRelease                                  
Ign:4 http://dl.google.com/linux/chrome/deb stable InRelease                                       
Hit:5 http://dl.google.com/linux/chrome/deb stable Release                                         
Hit:6 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease                                  
Hit:7 http://lk.archive.ubuntu.com/ubuntu bionic InRelease                                         
Ign:9 https://download.docker.com/linux/debian bionic InRelease                                    
Hit:10 http://lk.archive.ubuntu.com/ubuntu bionic-updates InRelease                                
Err:11 https://download.docker.com/linux/debian bionic Release                                     
  404  Not Found [IP: 13.35.8.98 443]
Hit:13 http://lk.archive.ubuntu.com/ubuntu bionic-backports InRelease                              
Hit:12 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Reading package lists... Done                                
E: The repository 'https://download.docker.com/linux/debian bionic 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.


$ sudo apt-get upgrade

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  libxml2 libxml2:i386
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

How can I remove from my source list because I don't need it anymore

mchid
  • 43,546
  • 8
  • 97
  • 150
soldier
  • 479
  • 1
  • 6
  • 17
  • 1
    I can see /etc/apt/sources.list and /etc/apt/sources.list.save `deb [arch=amd64] https://download.docker.com/linux/debian bionic stable

    deb-src [arch=amd64] https://download.docker.com/linux/debian bionic stable`

    @mchid

    – soldier Nov 18 '19 at 05:56

3 Answers3

34

According to the docker page for Ubuntu, the problem is that it should be https://download.docker.com/linux/ubuntu instead of https://download.docker.com/linux/debian.

Run the following command to fix this:

sudo sed -i 's/debian/ubuntu/g' /etc/apt/sources.list.d/docker.list
sudo apt update

However, if that doesn't fix the issue, run the following command:

sudo sed -i 's|docker.com/linux/debian|docker.com/linux/ubuntu|g' /etc/apt/sources.list
sudo apt update
mchid
  • 43,546
  • 8
  • 97
  • 150
9

I have used the following in Linux Mint:

  1. Determine the Ubuntu codename using the command below (and NOT the version codename):

    $ cat /etc/os-release | grep -i codename
    VERSION_CODENAME=una
    UBUNTU_CODENAME=focal
    
  2. Replace the Ubuntu codename in /etc/apt/sources.list.d/docker.list:

    https://download.docker.com/linux/ubuntu <CODENAME> stable
    

    In my case the command on docker website has set the codename to una (docker determines it using lsb_release -cs), but I had to change it to focal.

AP22
  • 201
0

If you are using Parrot Os, You have to Change parrtos in /etc/apt/sources.list.d/docker.list to the current debian release of your os version (bullseye, buster and so on).

sudo nano /etc/apt/sources.list.d/docker.list

The above command will open the docker.list file where you can change the link to now look like this:

deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bullseye stable

Just replace the bullseye with your debian codename and run sudo apt-get update again.