# Clear DNS cache: how to empty the DNS resolver cache

A regular [DNS flush](https://www.ionos.ca/digitalguide/server/configuration/flush-dns/ "Flush DNS") is useful for several reasons. In Windows, macOS, and Linux distributions like Ubuntu, the **web address cache** is cleared in a few steps.

## Clear DNS cache in Windows, Mac, and Linux – here’s how

Each operating system deals with internally stored entries for address resolution differently. To clear the DNS cache because, for example, the [DNS server is not responding](https://www.ionos.ca/digitalguide/server/know-how/dns-server-not-responding-whats-next/ "DNS server not responding – what’s next?"), you need **system-specific tools and commands**. Here are some instructions for the most important representatives.

### Clear DNS cache in Windows 11: here’s how

As a Windows 11 user, you can conveniently clear the DNS cache via the command prompt. To do this, start the tool via the “Run” dialog by pressing the key combination **\[Windows\] + \[R\]** and executing the “**cmd**” command.

[![Image: Windows 11: “cmd” command via “Run”](https://www.ionos.ca/digitalguide/fileadmin/_processed_/4/d/csm_clear-dns-cache-1_a0137a2ecb.webp "Windows 11: “cmd” command via “Run”")](https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Screenshots_2022/clear-dns-cache-1.png) Windows 11: “cmd” command via “Run”       Now type the following [CMD command](https://www.ionos.ca/digitalguide/server/know-how/windows-cmd-commands/ "Windows CMD commands") into the window of the command prompt:

```none
ipconfig /flushdns
```

Confirm the command by pressing enter. Windows 11 will begin to clear the DNS cache and notify you if the process was successful.

[![Image: Windows 11: Clear DNS cache via command prompt](https://www.ionos.ca/digitalguide/fileadmin/_processed_/4/d/csm_clear-dns-cache-2_258289e8f9.webp "Windows 11: Clear DNS cache via command prompt")](https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Screenshots_2022/clear-dns-cache-2.png) Windows 11: Clear DNS cache via command prompt.       ---

### Tip

Experiencing issues with the[ DNS server](https://www.ionos.ca/digitalguide/server/know-how/name-resolution-online-what-is-a-dns-server/ "Name resolution online: what is a DNS server?") even after clearing the cache? One solution is to [switch the DNS server](https://www.ionos.ca/digitalguide/server/configuration/how-to-change-dns-server/ "How to change DNS server")!

---

### Clear DNS cache in Windows 10: tutorial

Clearing the DNS cache in Windows 10 is just as easily done via the command prompt. For a convenient start of the command line application, use the key combination **\[Windows\] + \[R\]** and then enter “**cmd**”.

[![Image: Windows 10: launch CMD via “Run”](https://www.ionos.ca/digitalguide/fileadmin/_processed_/b/9/csm_clear-dns-cache-3_f5fb606976.webp "Windows 10: launch CMD via “Run”")](https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Screenshots_2022/clear-dns-cache-3.png) Windows 10: launch CMD via “Run”       Enter the following command to clear the Windows 10 DNS cache using the command line tool [ipconfig](https://www.ionos.ca/digitalguide/server/configuration/ipconfig/ "Ipconfig"):

```none
ipconfig /flushdns
```

Once the DNS cache is cleared, a notification is displayed.

[![Image: Clear DNS cache via command prompt (Windows 10)](https://www.ionos.ca/digitalguide/fileadmin/_processed_/f/b/csm_clear-dns-cache-4_6d431578b2.webp "Clear DNS cache via command prompt (Windows 10)")](https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Screenshots_2022/clear-dns-cache-4.png) Clear DNS cache via command prompt (Windows 10).       ###  Clear DNS cache in Linux distributions: step-by-step

Linux distributions do not use a native DNS cache. Address entries are only cached on the systems when DNS services such as **dnsmasq, nscd or systemd-resolved** (default in Ubuntu 18 and 20) are used.

A terminal command for **deleting** the cache memory is only available for **systemd-resolved**:

```none
sudo systemd-resolve --flush-caches
```

[![Image: Ubuntu 20.04: Clear DNS cache (systemd-resolved)](https://www.ionos.ca/digitalguide/fileadmin/_processed_/9/6/csm_clear-dns-cache-5_263864fcb7.webp "Ubuntu 20.04: Clear DNS cache (systemd-resolved)")](https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Screenshots_2022/clear-dns-cache-5.png) Ubuntu 20.04: Clear DNS cache (systemd-resolved).     To execute the command, simply enter the administrator password. Don’t be surprised if the **command does not return a message**. To verify that the deletion was successful, you can **view the systemd-resolved cache** by executing the following terminal command:

```none
sudo systemd-resolve --statistics
```

---

### Note

You can empty the caches of other DNS services such as **dnsmasq** and **nscd** by **restarting** the services. The appropriate commands in this case are “sudo service dnsmasq restart” and “sudo service nscd restart”.

---

### Clear DNS cache in macOS

Mac operating systems, like Windows systems, rely on a native DNS cache. However, the command you need to type to clear the DNS cache varies depending on the version you installed. In any case, you need the **terminal** for the input, which you can call up via the “Utilities” menu.

For **macOS versions 10.11** (El Capitan) and later, as well as **10.7, 10.8, and 10.9**, the clear command is as follows:

```none
sudo killall -HUP mDNSResponder
```

If you are using a device with **macOS 10.10** (Yosemite), you need the following command:

```none
sudo discoveryutil udnsflushcaches
```

Older versions like **macOS 10.5 and 10.6** use the following command:

```none
sudo dscacheutil -flushcache
```

After entering the corresponding command, you will be prompted to enter the **administrator password**. The DNS cache will then be cleared.

---

### Tip

Using a mobile Apple device with iOS? Clear the DNS cache by temporarily activating flight mode. Wait five to ten seconds and switch off the offline mode.

---


This is a markdown version of: [https://www.ionos.ca/digitalguide/server/configuration/clear-dns-cache/](https://www.ionos.ca/digitalguide/server/configuration/clear-dns-cache/) for AI/LLM consumption.