Following is an exercise in removing erroneous repo config that would cause apt update to kick out error messages…

byon@byon:~$ sudo apt update
Hit:1  stable InRelease
Ign:2 http://packages.linuxmint.com ulyana InRelease                                                                                                                                                           
Hit:3 http://security.ubuntu.com/ubuntu/ focal-security InRelease                                                                                                                                               
Hit:4 http://packages.linuxmint.com ulyana Release                                                                                                                                       
Ign:5 https://download.docker.com/linux/ubuntu/ ulyana InRelease                                                                                                                          
Get:6 https://download.docker.com/linux/ubuntu/ focal InRelease [36.2 kB]                              
Hit:7 http://archive.ubuntu.com/ubuntu/ focal InRelease                                                                              
Hit:8 http://archive.canonical.com/ubuntu/ focal InRelease                                       
Err:10 https://download.docker.com/linux/ubuntu/ ulyana Release      
  404  Not Found [IP: 99.84.206.109 443]
Hit:11 http://archive.ubuntu.com/ubuntu/ focal-updates InRelease   
Hit:9  kubernetes-xenial InRelease
Hit:12 http://archive.ubuntu.com/ubuntu/ focal-backports InRelease
Get:14 https://download.docker.com/linux/ubuntu/ focal/stable amd64 Packages [7,116 B]
Reading package lists... Done        
E: The repository 'https://download.docker.com/linux/ubuntu ulyana 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.


byon@byon:~$ ls /etc/apt/sources.list.d/
additional-repositories.list  google-chrome.list  kubernetes.list  official-package-repositories.list

byon@byon:~$ cat /etc/apt/sources.list.d/additional-repositories.list 
deb [arch=amd64] https://download.docker.com/linux/ubuntu/ ulyana stable
deb [arch=amd64] https://download.docker.com/linux/ubuntu/    focal    stable

byon@byon:~$ vim /etc/apt/sources.list.d/additional-repositories.list 
byon@byon:~$ sudo vim /etc/apt/sources.list.d/additional-repositories.list # the proceed to delete the two entries above

byon@byon:~$ sudo apt update
Ign:2 http://packages.linuxmint.com ulyana InRelease                                                                                                                                                       
Hit:3 http://packages.linuxmint.com ulyana Release                                                                                                                                                         
Get:1  kubernetes-xenial InRelease [9,383 B]                                                                                                    
Hit:4 http://security.ubuntu.com/ubuntu/ focal-security InRelease                                                             
Hit:5 http://archive.ubuntu.com/ubuntu/ focal InRelease                                    
Hit:6 http://archive.canonical.com/ubuntu/ focal InRelease           
Hit:7  stable InRelease
Hit:9 http://archive.ubuntu.com/ubuntu/ focal-updates InRelease
Hit:10 http://archive.ubuntu.com/ubuntu/ focal-backports InRelease
Fetched 9,383 B in 2s (5,091 B/s)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
byon@byon:~$ echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu/ $(lsb_release -cs) stable"
deb [arch=amd64] https://download.docker.com/linux/ubuntu/ ulyana stable

Often a repo would be installed with a trusted key. Thus, it’s an optional removal process to include the usage of apt-key list to list trusted keys. Then use apt-key del to delete the removed repo’s key.