Software⏱️ 2 min read📅 2026-05-31

How to Fix: apt-get update fails to fetch files, “Temporary failure resolving …” error

Temporary failure resolving 'security.ubuntu.com' error during apt-get update.

Quick Answer: Check your internet connection and try updating again after a few minutes.

Apt-get update failure can be frustrating, but it's often a simple issue to resolve. The error message you're seeing indicates a temporary failure resolving the Ubuntu repository, which is usually caused by a network connectivity problem or a DNS cache issue.

🔍 Why This Happens

  • Temporary DNS cache issues can prevent your system from resolving the Ubuntu repository's domain names.

🔧 Proven Troubleshooting Steps

Method 1: Clearing DNS Cache

  1. Step 1: Run the command `sudo apt-get update --fix-headers` to force Apt-get to use the latest headers.

Method 2: Updating DNS Cache

  1. Step 1: Run the command `sudo dhclient` to update your system's DNS cache.

🎯 Final Words

If none of these steps resolve the issue, you may want to consider resetting your system's network settings or checking with your ISP for any outages in their DNS service.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions