Installation issue: the repository focal Release does not have a Release file


I have an AWS instance in Lightsail running on Ubuntu Environment. When I am running the following code

sudo apt update && sudo apt install docker-ce docker-ce-cli

I have tried modifying this file:

vim /etc/apt/sources.list 

as per one of the suggested post. And now, I have eoan versus focal that is, it looks like this inside:

deb [arch=amd64] eoan stable
# deb-src [arch=amd64] focal stable
deb [arch=amd64] focal stable

I am not sure why it is bugging. Can anyone please take a look at this? Thank you in advance.

Something is definitely wrong with your config. I would quote the part of the output which seems wrong, if you shared the output as text. Please, do it next time whenever you can copy the text.

In the output you have ubuntu and debian repositories, that is something you also shared as text in code block. But I can also see this: apt-get Release

as if you have acidentally written “sudo apt-get” into the source list or a file in /etc/apt/sources.list.d

You should have only debian or ubuntu urls and try to clean your apt config files to remove commands.