Mar 08, 2017 How to Clear & Reset DNS Cache in MacOS Sierra. Mar 8, 2017 - 10 Comments. Mac OS users who have modified their DNS settings may need to clear their DNS cache before the changes take effect. Additionally, sometimes name servers and domains may not resolve as intended if you have stale DNS cache on the Mac, another situation where resetting DNS. Jul 06, 2018 Dr. Cleaner offers a free and effective way to clear cache on the Mac. It removes all unnecessary files that slow down your system in one click. Providing a one-stop solution for Mac OS maintenance, Dr. Cleaner removes every junk file including app cache, browser cache, library caches, log files, iTunes and iOS temporary files, and so on.
Your Mac takes care of routine maintenance behind the scenes eventually, but that doesn’t mean you can’t keep things tidy yourself in the meantime. One easy way to keep your Mac running its best is to occasionally clean the cache.
The guide to clean all caches on a Mac
There are three types of caches you can clean on your Mac:
- User (or App) cache. These cache files created by all the apps that you use on Mac. It includes apps that came with your macOS (like Mail) as well as 3rd-party apps (like Sketch). Every applications creates a lots of cache - it wouldn’t be surprising to clear up gigabytes of space when cleaning app caches.
- System cache. These cache data created by the built-in macOS system services that run your Mac.
- Browser cache. All browsers store your browsing history and cache data from websites you visit. You know how you shop for something online and then for weeks you’re seeing it everywhere? That’s because your browser caches hundreds of files that make up the websites you visit. Caches also include cookies and trackers that save information about your browsing history and report the data back to the site. This works out in your favor when you return to a site without having to log in again, but it can also leave you feeling like your computer is spying on you.
Old cache files do nothing but cluttering your system and slowing down your Mac through all the wasted space it is taking up. Here's a guide to cleaning all these caches, at the end of which your Mac will be lighter and leaner.
Besides browser and website information, your Mac keeps several caches of its own for different reasons. The good news is you can clean them up manually, or you can clean them with a special app which can clear the browser cache in Safari, Chrome, and Firefox, as well as your system cache, email cache, user cache files, and even your DNS cache files.
How to delete user caches on a Mac
User cache makes up the majority of junk data on macOS. Your applications accumulate user's cache data on a hard disk the longer they are in use. Some apps and utilities can build up cache sizes that reach into gigabytes. This is often just a waste of space, particularly with apps you don’t use every day. By clearing your user apps cache files, you’ll be amazed at how much hard disk space you can reclaim.
Note: Manually clearing cache files on a Mac is something that anyone can do. It takes some time and patience, but if you follow our instructions, you can get the job done all by yourself. Please follow the instructions closely.
Clean up user caches manually
To find and clear your user cache manually, do the following:
- In your Mac’s user folder, there’s a hidden Library folder, which itself contains a folder of caches left by the applications you’ve installed on your Mac.
- Strongly recommend that you remove the insides of ~/Library/Caches and /Library/Caches folders, but not the folders themselves.
- Want to make sure your junk user cache data is gone forever? - Empty out your Trash.
If you are unsure and want a safer option, go ahead and learn on how to use CleanMyMac to handle caches properly. It will find up to 5x more junk cache data to remove from all over your system.
Get rid of cache files with CleanMyMac
- Launch CleanMyMac app.
- Select System Junk in the left sidebar.
- Hit Scan at the bottom of app's window.
- Then click Clean.
And you're done! If you’d like to remove only cache files and nothing else, click on Review Details before clicking Clean. Deselect everything but System Cache Files and User Cache Files, then click Clean.
FlushDNS cache
Your Mac’s DNS cache is a list of all the DNS queries that were resolved for every site. When you type in 'setapp.com,' the DNS server resolves that to a numerical IP address. But if you notice a site not loading, or your browser acting up or working too slowly, resetting the DNS cache might be the cure.
To flush DNS cache manually
- Open Terminal (⇧ Shift+⌘+U, and double-click on Terminal)
- Type this into Terminal: sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder;say cache flushed
- Press Enter to run and fill your admin password to execute the command.
To clean your Mac’s DNS cache with CleanMyMac
- Open CleanMyMac and select Maintenance in the left sidebar
- Check the box for Flush DNS Cache
- Click the Run button at the bottom of the window
![Cache Cache](/uploads/1/2/5/8/125829484/143570054.jpg)
Delete system caches on Mac
System cache files are generated by OS X and, unlike application cache, have nothing to do with the user. The hidden system caches are mainly created by the apps that run on your Mac. The clearing of system cache is not recommended in manual mode, unless you are very careful or trying to fix a problem. System cache files do not generally take up much space, which is another reason why a clean out isn’t as necessary as with user cache.
Clearing cache in one click
Setapp has all you need to allow clear cache, without diving into settings and preferences. Give it a try.
Clean up system cache data manually
You can find and delete system cache in the same way as user cache, by
- Going to ~/Library/Caches and hit Enter to removing the insides of the folders with the app name.
- System cache folders are named com.apple and should be backed up for safety.
- Go into the com.apple folders and delete the files inside of them. Only the files, not the folders!
- Right click on the Trash icon and “Empty Trash”.
That’s it, now, just like with your user cache, your system cache is also clear.
Be careful: not all app cache files can be safely deleted. Some app developers keep important information on cache folders. The great idea to backing up a folder before you erase all files inside. If everything works fine, you can delete this backup.
One-button solution to cleanup macOS caches
CleanMyMac is such a great tool because it lets you perform the exact maintenance you want, or run a Smart Cleanup scan with a single click and have the software make recommendations.
Clean up browser caches
We love our browsers but we don’t love it when they start to use up hard disk space with cache files. Whether you’re wanting to free up space, get your browser performing better or trying to remove your history for the sake of privacy, removing your Mac browser cache will help.
Your browser cache is essentially saved bits of the websites you’ve visited recently. That way, if you go back, your computer can re-use locally cached elements that haven’t changed, which speeds up load times versus reloading everything fresh from the remote server. Your cache will overwrite itself eventually, but you can clear your cache, history, and cookies anytime you want to gain a little bit of extra security and speed up your Mac.
Clear Safari caches step-by-step
To delete Safari's websites' caches and cookies via browser preferences:
- Click Safari in the top menu click Preferences.
- In the window that appears, click the Advanced tab, and enable Show Develop menu.
- In menu bar go to Develop and choose Empty Caches.
Check and delete Safari browser cache with Terminal:
- Press Command + Shift + G to open up the Terminal
- With these simple commands you can delete Safari's cache file. But first, check its size using the disk usage (du) command:
du -h /Users/$HOME/Library/Caches/com.apple.Safari/Cache.db
Note: replace '$HOME' with the name of your home folder- To delete Safari's cache file type:
rm /Users/$HOME/Library/Caches/com.apple.Safari/Cache.db
Note: when you use the remove (rm)command files are essentially unrecoverable. - A more prudent approach is to use the move (mv) command:
mv /Users/$HOME/Library/Caches/com.apple.Safari/Cache.db ~/.Trash/
This will move the file to your user's ($HOME) trash. From there it is still recoverable until you empty the trash.
Safari will create a new Cache.db file automatically when you open a new webpage. - Open a new webpage or restart Safari and recheck disk usage:
du -h /Users/$HOME/Library/Caches/com.apple.Safari/Cache.db
- To delete Safari's cache file type:
That's all.
Chrome clearing cache tutorial
The simplest way to clear Chrome browser cache manually is:
- In the top right corner of Google Chrome browser click the 3-dot icon to choose Settings.
- At the bottom of the menu, choose Advanced (or use Cmd+Shift+Delete keyboard shortcut)
- Click Clear browsing data and deselect all, but Cached images and files. Choose time range and hit Clear data button.
One more way to delete Chrome browser cache is to clear some folders where these data located.
- To find Chrome cache files, open Finder and click to Go to the folder.
- To go to the folder where Chrome' primary cache locates type: ~/Library/Caches/Google/Chrome/
- To go to the folder with the additional bulk of cached data type:~/Library/Application Support/Google/Chrome/Default/Application Cache/
- Select files within these folders and delete them.
How to delete cache in Firefox manually
- Click the hamburger icon in the top right corner and choose Preferences.
- Choose Privacy & Security on the left sidebar.
- Scroll to the section Cookies and Site Data and click to Clear Data... tab
- Now, check Cached Web Content and click Clear button to delete Firefox cache.
- Exit/quit all browser windows and re-open the browser.
How to clean all browsers cache data at once
- Open CleanMyMac and select Privacy in the left sidebar
- Click Scan at the bottom of app's window
- Then Select Items to advance to the next page. The list is broken down by app: you can check each browser to remove all data, such as cookies, browsing history, downloads history, HTML5 local storage, saved passwords, and even close the tabs from your last session. Or you can uncheck any of that you want to keep
- Click the Remove button at the bottom of the window when you’re ready to delete everything that’s checked
Shape up your Mac even more with other apps in Setapp
CleanMyMac isn’t the only app in the Setapp collection that helps you take good care of your Mac. Setapp gives you access to all of its apps at once, so you can try to get your Mac in even better condition with no downside. Here are some examples.
Declutter automatically sorts files you leave on your desktop, so they’re not cluttering up your view but are still easy to find.
Disk Drill can perform data recovery tasks, like restoring deleted files that haven’t been written over yet, or grabbing anything usable off a corrupted flash drive.
Gemini can find duplicate files. For example, photos and videos you downloaded from your iPhone as well as emailed yourself. Or PDFs you downloaded and filed away once, only to download again later when you forgot you already had a copy.
iStat Menus monitors your Mac’s vital signs in real time, so when things slow down you can see which app is hogging all your memory.
Get Backup Pro makes it easy to make bootable backups of your system, making emergencies not so scary anymore.
Try all these apps for free
Get a huge set of top apps for keeping your Mac in shape. Best utilities in one pack, give it a go!
No one likes a slow Mac, and it’s a good idea to clean it up every so often. Cache files are the most common and probably the least understood offender that Setapp can help you to keep under control.
So you can do everything else in a blink of an eye. With Setapp, you have full access to the best solutions for performing routine Mac maintenance whenever you like.
In this article, we cover the best ways to clear your DNS cache on a Mac, including the different ways you can do that depending on the macOS you are running.
Your DNS cache acts like a memory that your Mac refers to when trying to figure out how to load a website.
Flushing the DNS isn’t a difficult task but the process changes with every new operating system. We’ll walk you through the steps needed to reset your DNS manually in the different versions of macOS and OS X, along with the easy solution of CleanMyMac X.
How to clear the DNS: The easy way
![Download Download](/uploads/1/2/5/8/125829484/166838285.png)
For those who want to get this done quickly, a much simpler alternative to clear the DNS cache on all versions of Mac is CleanMyMac.
CleanMyMac is a utility app designed to clean, optimize and maintain your Mac and flushing the DNS cache just so happens to be in its arsenal of features to help you do this.
To flush the DNS cache with CleanMyMac first you’ll need to download it — you can do that here for free.
Then…
- Launch CleanMyMac.
- Click on Maintenance from the sidebar menu.
- Select Flush DNS Cache.
- Click Run.
That’s it. Your DNS is all clear and everything should be back to normal. Or you can try one or more of the following methods.
How to clear the DNS: The manual way
Before we get started, note that resetting the DNS cache will interrupt active web browsing activity so it’s worth closing your browser before performing a flush.
How to flush the DNS cache in macOS High Sierra
1. Open the Finder and go to Applications > Utilities > Terminal.
2. Enter the following syntax at the command line:
sudo killall -HUP mDNSResponder; sleep 2; echo macOS DNS Cache Reset | say
3. Press Return, enter your password, and press Return again.
4. You should now see a message saying “macOS DNS cache reset.”
5. Exit the Terminal.
How to flush the DNS cache in macOS Sierra
Flushing the DNS cache on macOS Sierra is a near identical process to High Sierra, however, the syntax is different.
1. Open the Finder and go to Applications > Utilities > Terminal.
2. Enter (or copy-and-paste if it’s easier) the following syntax at the command line:
sudo killall -HUP mDNSResponder;say DNS cache has been flushed
3. Press Return, enter your password, and press Return again.
4. Listen out for the audio alert to signal that the cache has been successfully cleared.
If for some reason the above syntax doesn’t work, you can use the following syntax in the Terminal instead:
sudo killall -HUP mDNSResponder;sudo killall mDNSResponderHelper;sudo dscacheutil -flushcache;say MacOS DNS cache has been cleared
How to flush the DNS cache in Mac OS X El Capitan and Yosemite
The Mac OS X DNS Flush for El Capitan and Yosemite 10.10.4 and newer is thankfully the same. Both versions use the mDNSResponder.
1. Open the Finder and go to Applications > Utilities > Terminal.
2. Enter the following syntax at the command line:
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder;say cache flushed
3. Press Return, enter your password, and press Return again.
4. Wait for the audio alert to signal a successful flush.
5. Exit the Terminal.
For OS X Yosemite versions 10.10, 10.10.1, 10.10.2, and 10.10.3 the process is slightly different. To fully flush all DNS caches, you’ll need to clear both the Multicast DNS (MDNS) and Unicast DNS (UDNS).
- Clearing the MDNS cache
Follow the same instructions as above and enter this syntax in the Terminal:
sudo discoveryutil mdnsflushcache
- Clearing the UDNS cache
Follow the same instructions as above and enter this syntax in the Terminal:
sudo discoveryutil udnsflushcaches
- Clearing both MDNS and UDNS caches
There’s also the option to combine MDNS and UDNS commands to flush both caches at once:
sudo discoveryutil mdnsflushcache;sudo discoveryutil udnsflushcaches;say flushed
How to flush the DNS cache in older versions of Mac OS X
Very few people are still working on older versions of Mac, but “very few” is still some. So, for the 3.8% of Mac owners using OS X Mavericks and the 1.6% using OS X Snow Leopard, here are the instructions for an old-school OS X DNS flush.
How to flush the DNS cache in Mac OS X Mavericks
1. Open the Finder and go to Applications > Utilities > Terminal.
2. Enter the following syntax at the command line:
dscacheutil -flushcache;sudo killall -HUP mDNSResponder
3. Press Return, enter your password, and press Return again.
4. Exit the Terminal.
How to flush the DNS cache in Mac OS X Snow Leopard
1. Open the Finder and go to Applications > Utilities > Terminal.
2. Enter the following syntax at the command line:
sudo dscacheutil -flushcache
3. Press Return, enter your password, and press Return again.
4. Exit the Terminal.
Clearing the DNS cache isn’t something you’ll have to do often but it’s a good way to troubleshoot named server errors. Use the correct command for your operating system and you’ll be able to resolve issues within seconds. If, for whatever reason, the command doesn’t work or you don’t feel confident using the Terminal, CleanMyMac will do the job for you.
CleanMyMac X rids your system of junk and problematic files to improve performance and keep your Mac running smoother for longer. Download it today to have your computer running on a whole new level.