Celeb Glow
general | March 14, 2026

Some index files failed to download. They have been ignored, or old ones used instead. When sudo apt update with WSL 2

$ sudo apt update
Err:1 focal InRelease Temporary failure resolving 'archive.ubuntu.com'
Err:2 focal-security InRelease Temporary failure resolving 'security.ubuntu.com'
Err:3 focal-updates InRelease Temporary failure resolving 'archive.ubuntu.com'
Err:4 focal-backports InRelease Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: Failed to fetch Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch Temporary failure resolving 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
  • System: Windows 10 PRO 19044.1415

  • WSL 2, Ubuntu 20.04

ping to google.com also fails: ping: google.com: Temporary failure in name resolution


Already done:

  • wsl.conf with those lines inside of it:
[network]
generateResolvConf = false
  • re-created resolv.conf with several nameserver's:
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 1.1.1.1

Tried:

  • to add nameserver 8.8.8.8 into wsl.conf. Doesn't work.
  • keep single nameserver line inside of resolv.conf
  • followed those steps
  • New-NetFirewallRule -DisplayName "WSL" -Direction Inbound -InterfaceAlias "vEthernet (WSL)" -Action Allow from here

Question replaced from StackOverflow

11

1 Answer

Finally found asnwer. It isn't even my fault...

This advice helped me, and sudo apt update finally worked. If u dont' have .wslconfig file, create it yourself.

Ended up with this inside of resolv.conf:

nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 1.1.1.1
nameserver 208.67.222.222 # OpenDNS address
nameserver 192.168.0.10 # ipv4 address of your windows machine. *1

*1 - source

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy