0

I am trying to update the apt source. I am getting the following error. How to fix it?

sudo apt-get update
Hit:1 https://download.gocd.org  InRelease
Ign:2 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                 
Hit:3 http://dl.google.com/linux/chrome/deb stable Release                                                                                   
Hit:4 http://ppa.launchpad.net/ansible/ansible/ubuntu cosmic InRelease                                                                       
  404  Not Found [IP: 147.75.85.69 80]
Err:16 http://us.archive.ubuntu.com/ubuntu cosmic-updates Release
  404  Not Found [IP: 91.189.91.38 80]
Reading package lists... Done
E: The repository 'http://apt.postgresql.org/pub/repos/apt cosmic-pgdg 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.
E: The repository 'http://security.ubuntu.com/ubuntu cosmic-security 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.
E: The repository 'http://us.archive.ubuntu.com/ubuntu cosmic Release' does not have a Release file.

linux@bheemesh:~/Downloads$** 

1 Answers1

0

So you may have upgraded your OS or the support for it has ended and that is the problem. Those repositories don't support your OS version. The repositories are still available on http://old-releases.ubuntu.com/ubuntu. You can change them in /etc/apt/sources.list, replacing all occurences of http://us.archive.ubuntu.com with http://old-releases.ubuntu.com.

you can open sources.list via the terminal with sudo nano etc/apt/sources.list

Another way to fix the problem:

  1. Open "Software & Updates"
  2. Click "Other Software"
  3. Choose a repository you get an error from and remove the checkbox
  4. Do the same with the repos you get other errors as well
Grigor
  • 176