How do I update packages on a Linux (ubuntu 20.04) VM?

Susan Duenas 0 Reputation points
2024-06-03T19:37:33.0766667+00:00

If I run apt-get update OR apt-get update --allow-insecure-repositories I get

N: Updating from such a repository can't be done securely, and is therefore disabled by default.

E: The repository 'http://azure.archive.ubuntu.com/ubuntu focal InRelease' is not signed.

E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/dists/focal/InRelease 470 status code 470 [IP: 52.154.174.208 80]

N: See apt-secure(8) manpage for repository creation and user configuration details.

N: Updating from such a repository can't be done securely, and is therefore disabled by default.

E: The repository 'http://azure.archive.ubuntu.com/ubuntu focal-updates InRelease' is not signed.

E: Failed to fetch http://azure.archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease 470 status code 470 [IP: 52.154.174.208 80]

Is this a local or Azure firewall issue?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,044 questions
{count} votes

1 answer

Sort by: Most helpful
  1. David Broggy 6,371 Reputation points MVP Volunteer Moderator
    2024-06-04T12:30:48.9266667+00:00

    Hi Susan!
    How is the /etc/apt/sources.list file and any files in /etc/apt/sources.list.d/ configured?

    It's unlikely to be a firewall issue, however you could try using wget to test that theory, eg:

    wget http://azure.archive.ubuntu.com/ubuntu/dists/focal/InRelease

    have you tried adding trusted = yes?

    deb [trusted=yes] http://azure.archive.ubuntu.com/ubuntu focal main restricted

    deb [trusted=yes] http://azure.archive.ubuntu.com/ubuntu focal-updates main restricted

    https://askubuntu.com/questions/1208286/ensure-add-apt-repository-keeps-trusted-yes-from-deb-input-string

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.