Javascript required
Skip to content Skip to sidebar Skip to footer

How to Clear Cache in Windows 10 Using Cmd

Guide to Flush DNS on Windows, Mac, Linux, Ubuntu, Google Chrome

Contents

    • Guide to Flush DNS on Windows, Mac, Linux, Ubuntu, Google Chrome
  • Flush DNS Cache on Microsoft Windows
    • Windows 10
    • Windows 8 / Windows 8.1
    • Windows Vista / Windows 7
    • Windows XP / 2000 / NT / 98
  • Flush DNS Cache on Mac OS
    • MacOS 10.15: Catalina
    • MacOS 10.14: Mojave
    • MacOS 10.13: High Sierra
    • MacOS 10.12: Sierra
    • Mac OS X 10.11: El Capitan
    • Mac OS X 10.10: Yosemite
    • Mac OS X 10.9: Mavericks
    • Mac OS X 10.8: Mountain Lion
    • Mac OS X 10.7: Lion
    • Mac OS X 10.6: Snow Leopard and older versions
  • Clear DNS Cache on Linux or Ubuntu
    • Linux
    • Ubuntu
  • Bonus: Flush DNS on Google Chrome

Flush DNS is a command which helps to clear outdated or corrupted DNS resolver cache. It is commonly used along with IP release and renew commands to fix network connectivity related issues. As your computer automatically caches IPs and other DNS results to make subsequent requests to the same hostname faster, it might also cache some old or bad results. As a consequence, you might not be able to communicate with hosts properly. In fact, it is one of the best methods to solve INET_E_RESOURCE_NOT_FOUND error.

No matter what operating system (Windows, Linux, Mac, Ubuntu) or browser you use, you can manually speed up the process and clear DNS Cache using simple steps provided below. To make the navigation easier, use Table of Contents to jump to guide for your operating system version.

Related: How to Release & Renew IP Address on Windows, Mac, Linux?

The following instructions explain how to flush DNS on these operating systems:

  • Windows 10, 8.1, 8, 7, Vista, 2000, NT, XP, 98;
  • MacOS versions from 10.6 (Snow Leopard) to 10.15 (Catalina);
  • Linux;
  • Ubuntu;
  • Chrome.
how to flush dns
The method helps to solve various DNS-related issues.

Flush DNS Cache on Microsoft Windows

Windows 10

Flush DNS on Windows 10 is a simple command that needs to be entered in Windows Command Processor, better known as Command Prompt (CMD). You must, however, open CMD with Administrator's privileges. Here's what you need to do.

  1. In Windows 10, use Windows search and type Command Prompt .
  2. Right-click Command Prompt and choose Run as Administrator.
  3. In User Account Control pop-up, click Yes.
  4. In CMD, type ipconfig /flushdns and press Enter.
flush dns on windows 10 guide
Follow these easy steps to complete the task on Windows 10.

Windows 8 / Windows 8.1

To flush DNS on Windows 8 or 8.1, ensure to use Command Prompt with Admin's privileges. Follow these steps to clear your DNS cache.

  1. In Windows 8/8.1, use Windows search and type Command Prompt .
  2. Right-click Command Prompt and choose Run as Administrator.
  3. In User Account Control pop-up, click Yes.
  4. In CMD, type ipconfig /flushdns and press Enter.

Windows Vista / Windows 7

In order to flush DNS cache on Windows 7, you need to open Command Prompt as Administrator. Here's how.

  1. Click on Start > All Programs > Accessories and find Command Prompt.
  2. Right-click Command Prompt and choose Run as Administrator.
  3. In CMD, type ipconfig /flushdns and press Enter.

Windows XP / 2000 / NT / 98

If you're looking on how to clear DNS cache on older Windows versions, look no further. All you need to do is:

  1. Click on Start > Run > cmd.exe > OK.
  2. Type ipconfig /flushdns and press Enter.

Flush DNS Cache on Mac OS

flush dns on mac os x
Flushing DNS on Mac is easy.

To clear DNS Cache on Mac OS X systems, follow the guidelines given below. Please pay attention to the commands shown for different Mac OS versions – not all of them are the same for every OS.

MacOS 10.15: Catalina

To flush DNS on MacOS Catalina, follow these steps.

  1. Open Terminal (Application UtilitiesTerminal or click Go > Utilities > Terminal)
  2. Type sudo killall -HUP mDNSResponder and press Enter to run the command.
  3. Enter your password (it might not appear on the screen as you type).
  4. Press Enter. Close the Terminal.
open terminal in mac first method
First Method to open Terminal in Mac.

MacOS 10.14: Mojave

Clearing DNS on MacOS Mojave is a quick and easy procedure if you follow these steps.

  1. Open Terminal (Application UtilitiesTerminal or click Go > Utilities > Terminal).
  2. Type sudo killall -HUP mDNSResponder and press Enter to run the command.
  3. Enter your password (it might not appear on the screen as you type).
  4. Press Enter. Close the Terminal.

MacOS 10.13: High Sierra

Flushing DNS on MacOS High Sierra can be done by following these guidelines.

  1. Open Terminal (Application UtilitiesTerminal or click Go > Utilities > Terminal).
  2. Type sudo killall -HUP mDNSResponder and press Enter to run the command.
  3. Enter your password (it might not appear on the screen as you type).
  4. Press Enter. Close the Terminal.
second method to open terminal via mac to flush dns
Second method to open terminal on Mac.

MacOS 10.12: Sierra

If you want to flush DNS on MacOS Sierra, follow these directions.

  1. Open Terminal (Application UtilitiesTerminal or click Go > Utilities > Terminal).
  2. Type sudo killall -HUP mDNSResponder and press Enter to run the command.
  3. Enter your password (it might not appear on the screen as you type).
  4. Press Enter. Close the Terminal.
mac os flush dns command in terminal
This command flushes DNS cache in the majority of Mac OS X systems except Yosemite, Lion and previous versions.

Mac OS X 10.11: El Capitan

To flush DNS on MacOS X El Capitan, follow these steps.

  1. Open Terminal (Application UtilitiesTerminal or click Go > Utilities > Terminal).
  2. Type sudo killall -HUP mDNSResponder and press Enter to run the command.
  3. Enter your password (it might not appear on the screen as you type).
  4. Press Enter. Close the Terminal.

Mac OS X 10.10: Yosemite

In order to flush DNS on MacOS X Yosemite, carry out these steps.

  1. Open Terminal (Application UtilitiesTerminal or click Go > Utilities > Terminal).
  2. Type sudo discoveryutil udnsflushcaches  and press Enter to run the command.
  3. Enter your password (it might not appear on the screen as you type).
  4. Press Enter. Close the Terminal.
Mac OS X Yosemite flush DNS command
This command clears the cache for most Yosemite OS X.

Mac OS X 10.9: Mavericks

To flush DNS on MacOS X Mavericks, follow these steps.

  1. Open Terminal (Application UtilitiesTerminal or click Go > Utilities > Terminal).
  2. Type sudo killall -HUP mDNSResponder  and press Enter to run the command.
  3. Enter your password (it might not appear on the screen as you type).
  4. Press Enter. Close the Terminal.

Mac OS X 10.8: Mountain Lion

To clear DNS cache on MacOS X Mountain Lion, complete given instructions.

  1. Open Terminal (Application UtilitiesTerminal or click Go > Utilities > Terminal).
  2. Type sudo killall -HUP mDNSResponder  and press Enter to run the command.
  3. Enter your password (it might not appear on the screen as you type).
  4. Press Enter. Close the Terminal.

Mac OS X 10.7: Lion

To flush DNS on MacOS X Lion, follow these steps.

  1. Open Terminal (Application UtilitiesTerminal or click Go > Utilities > Terminal).
  2. Type sudo killall -HUP mDNSResponder  and press Enter to run the command.
  3. Enter your password (it might not appear on the screen as you type).
  4. Press Enter. Close the Terminal.

Mac OS X 10.6: Snow Leopard and older versions

To flush DNS on MacOS X Lion, follow these steps.

  1. Open Terminal (Application UtilitiesTerminal or click Go > Utilities > Terminal).
  2. Type sudo lookupd -flushcache  and press Enter to run the command.
  3. Enter your password (it might not appear on the screen as you type).
  4. Press Enter. Close the Terminal.

Clear DNS Cache on Linux or Ubuntu

Linux

  1. Launch Terminal by pressing Ctrl + Alt + T.
  2. Linux offers various commands for DNS flushing. Here are they:
  3. To clear nscd DNS cache: sudo /etc/init.d/nscd restart ;
  4. To clear dnsmasq DNS cache: sudo /etc/init.d/dnsmasq restart ;
  5. To clear BIND DNS cache, use one of the given commands:
    1. sudo /etc/init.d/named restart ;
    2. sudo rndc restart ;
    3. sudo rndc exec .
linux commands for flushing dns
Linux commands for clearing domain name system cache.

Ubuntu

  1. Launch Terminal by pressing Ctrl + Alt + T.
  2. Type the following command: sudo /etc/init.d/dns-clean restart and press Enter.
    flush dns on ubuntu step 1
  3. Now, type sudo /etc/init.d/networking force-reloadand press Enter.
    flush dns on ubuntu step 2

Bonus: Flush DNS on Google Chrome

Google Chrome browser has an in-built caching system. In order to clear DNS cache from Chrome, complete these steps.

  1. Open Chrome browser. Copy and paste the following line into the Chrome address bar, then pressEnter.

    chrome://net-internals/#dns

  2. ClickClear host cache.
  3. Now click on Sockets.
  4. Click Flush socket pools.
    flush dns in chrome

If you want to clear DNS cache on browsers like Firefox or Safari, we suggest resetting them.

That's it! We hope that our guide on how to flush DNS on Windows, Mac, Linux, Ubuntu or Chrome helped you to solve the problem.

This post was originally published on August 22, 2019 and updated on January 5, 202 1.

How to Clear Cache in Windows 10 Using Cmd

Source: https://geeksadvice.com/flush-dns/