0

I am trying to update my packages in ubuntu 20.4 but its not working and gives the error below

Err:13 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/3.6.3 Release 404 Not Found [IP: 18.165.201.119 443]

I have removed or uninstall mongodb from my packages or machine but still sees this error anytime I run

sudo apt-get update sudo apt autoremove

Can someone please help. Thank you all.

  • MongoDB 3.6 was last updated 2 years ago. It's no longer supported in Ubuntu 20.04 and above. – stdunbar Jun 28 '23 at 15:11
  • Yes, that is what I learnt from other sources but the problem is how do i prevent this error from appearing anytime I run ``` sudo apt-get update```. As i said i don't even need mongodb on my system for now. All I want it a successful update.Thank you – Albert Attakora Frimpong Jun 28 '23 at 15:18
  • "how do i prevent this error from appearing anytime I run 'sudo apt-get update'": `grep -rs repo.mongodb.org /etc/apt` and rename/remove that source or comment-out corresponding lines – yvs2014 Jun 28 '23 at 15:20
  • 1
    Bravo, it worked after I removed the files from the directories. Thank you so much. I really appreciate it. – Albert Attakora Frimpong Jun 28 '23 at 15:48

1 Answers1

1

Uninstalling the package does not delete the repository. The non existing repo path is what causes the error with apt. You can take a look into your list of repositories and remove it from there.

$ apt-add-repository --list

There you should be able to see it.

And now delete it.

sudo add-apt-repository --remove <the-repository>

You can also remove the created sources file, which you'll find in:

/etc/apt/sources.list.d/...

You might also want to remove remnants previously downloaded packages it in: (doesn't solve your issue, but cleans up)

/var/lib/apt/lists/repo.mongodb.*
srn
  • 614
  • 3
  • 15