apt update docker.com Release 404 not found

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


Solution 1:

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