• Latest
  • Trending
  • All
Answer card: flush the DNS cache on Linux with sudo resolvectl flush-caches for systemd-resolved, or restart nscd or dnsmasq.

How to flush the DNS cache on Linux

3 September 2026
Answer card stating that Mullvad announced on 3 September 2026 that it is shutting down its public encrypted domain name system servers on 2 November 2026 and sponsoring the Quad9 Foundation instead, with 194.242.2.2 and its five sibling addresses all going away, and virtual private network customers unaffected.

Mullvad’s DNS servers go dark on 2 November, and Quad9 blocks no ads

5 September 2026
OpenAI announcement image for GPT-6 Astra, a spiral galaxy of white, blue and amber points of light curling around a bright core on a near black star field.

GPT-6 Astra lists at $10 and $50, 2.5x what GPT-5.6 Sol costs

4 September 2026
Google's official announcement image for the release, reading Introducing Gemini 3.8 Flash and 3.8 Flash Cyber in black type over a pale blue background with a blurred white chevron and the four colour Gemini spark below.

Gemini 3.8 Flash keeps the price and the 1 January cliff

3 September 2026
Answer card stating that Anthropic announced Enterprise Frontier Safeguards on 1 September 2026, that activity data used for misuse monitoring moves into cloud storage the customer controls under the customer own encryption keys, that Anthropic charges nothing for the feature while the cloud provider bills storage and egress, and that the phased rollout starts later in autumn 2026 with interim zero data retention on Fable 5 and Fable 5.1 for eligible customers.

Anthropic moves retention into your own cloud, for 30 days

3 September 2026
Official Google diagram of a client connection in three numbered steps: a DNS lookup with a query and an address, a TLS ClientHello and ServerHello, then a content exchange with a website. A callout on the DNS step reads 25% of global web traffic is now protected by encrypted DNS, and a callout beside an Android phone on the ClientHello step reads Android 17 supports ECH GREASE by default.

Android 17 hides the SNI, not your DNS or destination

3 September 2026
Still frame from the Claude Fable 5.1 launch video showing model-designed protein binders in orange docked against twelve grey target proteins, rendered as ESMFold2 structure predictions.

Claude Fable 5.1 breaks forced tool use, cuts cache 75%

1 September 2026
Answer card stating that on 31 August 2026 the European Commission designated ChatGPT a Very Large Online Search Engine under the Digital Services Act, the first conversational AI service classified that way, because it answers user prompts and queries including by searching the web, with OpenAI having declared roughly 159.1 million average monthly users in the European Union for ChatGPT search.

The EU now calls ChatGPT a very large search engine

3 September 2026
Answer card stating that on 31 August 2026 the Department of War added OpenAI ChatGPT Mil and Starshield AI Grok for Government to the GenAI.mil portal alongside Google Gemini, all three accredited at Impact Level 5 for Controlled Unclassified Information, with 1.7 million unique users onboarded out of roughly 3 million eligible personnel, and ChatGPT Mil currently serving GPT-5.4 Terra with GPT-5.6 Terra said to be rolling out.

ChatGPT Mil and Grok reached IL5 on GenAI.mil

3 September 2026
Answer card stating that Anthropic opened a research preview of the Model Hardware Standard on 27 August 2026, standardising the driver layer between an operating system and a laboratory instrument with read and write primitives plus discovery and safety limits, reachable through MCP as well as a command line and code files, with no public specification published.

Anthropic’s Model Hardware Standard is gated, and sits under MCP

3 September 2026
Official Cohere key art for the Parse 5 launch: the Cohere mark and the wordmark Parse with a superscript 5 in white, centred on a soft out of focus gradient of deep blue, violet and amber curves.

Cohere Parse 5 is $1.50 per 1,000 pages, on three of five dimensions

3 September 2026
Title card from the OpenAI announcement video: a man sits on a blue sofa in a loft with tall windows and potted plants, a laptop open on the coffee table in front of him, with the words WebMCP in ChatGPT in large white type across the lower left.

WebMCP in ChatGPT needs GPT-5.6 Sol or Terra

3 September 2026
The Agentic Coding section of the official Hy4 preview benchmark appendix published by Tencent, a table comparing Hy3 and Hy4 preview against DeepSeek V4 Pro 0813, Qwen 3.8 Max, GLM 5.3, Kimi K3, GPT 5.6 Sol and Claude Opus 5 across SWE-bench Multilingual, SWE-bench Pro, DeepSWE, three SWE Atlas tasks, SWE-Marathon, Terminal-Bench 2.1, NL2Repo-Bench, CyberGym, ProgramBench, PostTrainBench and Harbor-Index.

Tencent’s 770B Hy4 tops one benchmark row in 46

3 September 2026
  • About
  • Contact
  • Privacy
  • Legal
Saturday, September 5, 2026
  • Login
Packet Nebula
  • Home
  • Articles
    • Security
    • Network
    • Dev
    • Sysadmin
    • SEO
    • Email & DNS
  • Tools
    • Network tools: free, fast, no signup
    • Security tools: free, fast, no signup
    • Developer tools: free, fast, no signup
    • Sysadmin tools: free, fast, no signup
    • SEO tools: free, fast, no signup
    • Email & DNS tools: free, fast, no signup
  • Download
  • About
No Result
View All Result
Packet Nebula
No Result
View All Result
Home Network

How to flush the DNS cache on Linux

by stephane
3 September 2026
in Network
0
Answer card: flush the DNS cache on Linux with sudo resolvectl flush-caches for systemd-resolved, or restart nscd or dnsmasq.
491
SHARES
1.4k
VIEWS
Share on FacebookShare on Twitter

You fixed the DNS record, and your Linux box keeps serving the old IP anyway. On modern Ubuntu, Debian and Fedora the fix is sudo resolvectl flush-caches, because systemd-resolved is what's caching. Unlike Windows there's no single universal command, though. Older or lighter systems run nscd or dnsmasq, each cleared its own way, and plenty of Linux machines run no local cache at all, so there's genuinely nothing to flush. We'll show you how to tell which resolver you've actually got, the exact command for each one, how to confirm the cache emptied, and where the stale record hides when it lives outside your machine.

The short answer

Find out what actually caches DNS on your box first. On modern distros it’s systemd-resolved: sudo resolvectl flush-caches. On others it’s nscd or dnsmasq, each restarted its own way. And plenty of Linux machines cache nothing locally, so there’s nothing to flush.

resolvectlflush-caches (systemd)
nscdor dnsmasq on older boxes
sudorequired for the flush
Answer card showing sudo resolvectl flush-caches as the way to clear systemd-resolved on Linux.
The command depends on your resolver. Step one is finding out which one you run.

Find which resolver you run, then flush it

Linux
resolvectl status

A Global block listing DNS servers means you’re on systemd-resolved, so jump to Step 2. If resolvectl comes back command not found, you’re on nscd or dnsmasq (Step 3), or nothing local caches DNS and you’re already done.

Linux
sudo resolvectl flush-caches

Done. It clears instantly, and no output means success. On older systemd releases the same command is sudo systemd-resolve --flush-caches.

Running a separate caching daemon? Restart it. For nscd:

Linux
sudo systemctl restart nscd

For dnsmasq (common on routers and on setups using NetworkManager’s resolver):

Linux
sudo systemctl restart dnsmasq

Confirm the cache is empty

Don’t just trust it. For systemd-resolved, the statistics show the live cache size:

Linux
resolvectl statistics | grep "Current Cache Size"

It reads 0 straight after a flush, then climbs as new lookups land. The full sequence:

Terminal showing resolvectl statistics before and after sudo resolvectl flush-caches, with the cache size dropping to zero.
Check the size, flush, check again. Zero means it worked.

When there’s nothing to flush

We see this a lot on minimal server installs: no local DNS cache at all. The stale answer you’re chasing sits at the router or the public resolver, held there until its TTL expires, and no command on your box will hurry it along. macOS is different again (honestly, I look that one up every time): there it’s sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder.

On Windows? One command for everyone: see how to flush the DNS cache on Windows.

Worth saying plainly: plenty of Linux desktops and most minimal servers have no DNS cache at all. If nothing is running systemd-resolved, dnsmasq or nscd, then every lookup already goes straight to your resolver and there’s nothing to flush. A stale answer in that case is coming from the upstream resolver or from the application, not from your machine.

One naming trap on systemd. The old systemd-resolve --flush-caches was renamed to resolvectl flush-caches in systemd 239, and the old name lingers in half the answers online. Both work on many distributions because the old binary is kept as a symlink, but on a recent Ubuntu the modern form is the one to use. Check the effect rather than trusting the exit code.

Linux
resolvectl statistics

Frequently asked questions

How do I know if I use systemd-resolved?

Run "resolvectl status". A Global section with DNS servers means systemd-resolved is active and caching. If the command doesn't exist, you're on nscd or dnsmasq, or you’ve no local cache at all.

What’s the command on older systemd versions?

Before resolvectl existed the same job was "sudo systemd-resolve --flush-caches". Many systems still keep it around as an alias, so it's worth a try when resolvectl is missing but systemd-resolved is clearly running.

My distro has no local resolver. Where is DNS cached then?

Then nothing on your machine caches it. The record sits with whatever resolver /etc/resolv.conf points to (your router, or a public resolver such as 1.1.1.1) and it stays put until its TTL expires. Our DNS TTL guide explains that wait.

Does flushing the cache need sudo?

Yes for the flush itself (resolvectl flush-caches, or restarting nscd or dnsmasq), since you're touching a system service. Reading the status and statistics works fine without it.

Tags: dnsguidelinuxresolvectlsystemd-resolved
Share196Tweet123
stephane

stephane

  • Trending
  • Comments
  • Latest
Answer card: Proton Lumo 2.0 is private by policy, not by locality. Saved history is locked so even Proton cannot read it, but the prompt is decrypted on a Proton EU server to answer it, then forgotten.

Proton Lumo 2.0 review: how private is it, really?

3 September 2026
Answer card stating that Anthropic announced Enterprise Frontier Safeguards on 1 September 2026, that activity data used for misuse monitoring moves into cloud storage the customer controls under the customer own encryption keys, that Anthropic charges nothing for the feature while the cloud provider bills storage and egress, and that the phased rollout starts later in autumn 2026 with interim zero data retention on Fable 5 and Fable 5.1 for eligible customers.

Anthropic moves retention into your own cloud, for 30 days

3 September 2026
Google's official announcement image for the release, reading Introducing Gemini 3.8 Flash and 3.8 Flash Cyber in black type over a pale blue background with a blurred white chevron and the four colour Gemini spark below.

Gemini 3.8 Flash keeps the price and the 1 January cliff

3 September 2026
Answer card: JWTs are not encrypted, anyone can read them; the signature proves who issued the token, not who may read it.

Are JWTs encrypted? No, and the difference will bite you

0
Answer card: a random 8 character password falls in under 2 hours offline, while 16 random characters hold for 1.4 trillion years at the same speed.

How long does it take to crack a password in 2026?

0
Answer card: three DNS records decide if your mail lands or bounces; SPF lists allowed senders, DKIM signs messages, DMARC sets the failure policy.

SPF, DKIM and DMARC explained: the records your email needs

0
Answer card stating that Mullvad announced on 3 September 2026 that it is shutting down its public encrypted domain name system servers on 2 November 2026 and sponsoring the Quad9 Foundation instead, with 194.242.2.2 and its five sibling addresses all going away, and virtual private network customers unaffected.

Mullvad’s DNS servers go dark on 2 November, and Quad9 blocks no ads

5 September 2026
OpenAI announcement image for GPT-6 Astra, a spiral galaxy of white, blue and amber points of light curling around a bright core on a near black star field.

GPT-6 Astra lists at $10 and $50, 2.5x what GPT-5.6 Sol costs

4 September 2026
Google's official announcement image for the release, reading Introducing Gemini 3.8 Flash and 3.8 Flash Cyber in black type over a pale blue background with a blurred white chevron and the four colour Gemini spark below.

Gemini 3.8 Flash keeps the price and the 1 January cliff

3 September 2026
  • About
  • Contact
  • Privacy
  • Legal

Copyright © 2026 Stephane Cardon.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
No Result
View All Result
  • Home
  • Articles
    • Security
    • Network
    • Dev
    • Sysadmin
    • SEO
    • Email & DNS
  • Tools
    • Network tools: free, fast, no signup
    • Security tools: free, fast, no signup
    • Developer tools: free, fast, no signup
    • Sysadmin tools: free, fast, no signup
    • SEO tools: free, fast, no signup
    • Email & DNS tools: free, fast, no signup
  • Download
  • About

Copyright © 2026 Stephane Cardon.