Errors while updating. Temporary Faliure resolving archive.ubuntu.com [duplicate]

Here is the output of apt update:

$ sudo apt update
[sudo] password for dmdkb5: 
Err:1 http://in.archive.ubuntu.com/ubuntu focal InRelease                   
  Temporary failure resolving 'in.archive.ubuntu.com'
Err:2 http://security.ubuntu.com/ubuntu focal-security InRelease            
  Temporary failure resolving 'security.ubuntu.com'
Err:3 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease           
  Temporary failure resolving 'in.archive.ubuntu.com'
Err:4 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease
  Temporary failure resolving 'in.archive.ubuntu.com'
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/focal/InRelease  Temporary failure resolving 'in.archive.ubuntu.com'
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease  Temporary failure resolving 'in.archive.ubuntu.com'
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease  Temporary failure resolving 'in.archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease  Temporary failure resolving 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.

As in the output, I'm on Ubuntu 20.04 LTS.


As the output of your apt update command suggests, the system does not manage to find the software servers. If your internet otherwise works, then the issue could be with the servers, or the connection to these servers.

Either wait a bit to see if the problem gets resolved. Alternatively, you could, at least temporarily, try different servers. You can switch servers on the "Ubuntu Software" tab in the "Software & Updates" tool.


As mentioned by Vanadium,

As the output of your apt update command suggests, the system does not manage to find the software servers. If your internet otherwise works, then the issue could be with the servers, or the connection to these servers.

As I told in my this answer, you can follow the following steps to change the mirror server.

First, open the "Software and Updates" app from the Application launcher or simply run software-properties-gtk in the terminal.

After opening the application you will see 6 tabs and in each tab, a few options: enter image description here

Go to the "Ubuntu Software" tab. (the first one)

Then there you will see a bunch of options. There would be a drop-down menu there saying "Download from", Click on that.

It will look like this:

enter image description here

From there you could select "Main server" or the server you prefer. If you want to select a server in a country then you can go to "Other..." Tab and from there select the preferred server.

enter image description here

You can also click on "Select the best server" to get the best download speed.


If you want to know more about mirrors/download server refer to What is a download server.