Category: "Macintosh OS X Tips"

  07:15:00 pm , Categories: Macintosh OS X Tips

How to Reset DNS Cache in macOS High Sierra

How to Reset DNS Cache in macOS High Sierra

Dec 18, 2017

Terminal in macOS

Need to reset and clear DNS cache in macOS High Sierra? Some Mac users may need to occasionally reset their local DNS cache, typically because the Mac DNS settings have changed, or a particular name server or domain is cached and they need to flush existing DNS cache.


While it’s most often web developers, systems administrators, and network admins that fiddle with DNS and have to reset and clear their DNS caches, sometimes other Mac users need to clear the DNS caches as well.

In macOS High Sierra, you can reset DNS cache by targeting the mDNSResponder process via the command line available in Terminal app. This is similar to clearing DNS cache in macOS Sierra and El Capitan, though the process to reset DNS cache has changed many times throughout the history of the Mac OS and Mac OS X operating system.

How to Reset DNS Cache in MacOS High Sierra

Note that resetting and flushing DNS cache will likely interrupt any active internet activity or usage.

    1. Launch the Terminal application, it is found within the /Applications/Utilities/ folder on a Mac

Flushing DNS cache is done via Terminal in macOS

    1. At the command line, enter the following syntax:

sudo killall -HUP mDNSResponder; sleep 2; echo macOS DNS Cache Reset | say

    1. Hit the Return key and then enter the administrator password, then hit return again

Reset DNS cache in macOS High Sierra

  1. Wait a moment, when you see the text “macOS DNS Cache Reset” appear in Terminal the DNS cache reset has been successful
  2. Exit Terminal

You may need to quit and relaunch certain internet connected applications for the changes to take effect, though most web browsers can suffice with a simple refresh.


If the above approach doesn’t work for whatever reason, you can break the command syntax down into smaller components:

sudo killall -HUP mDNSResponder && echo macOS DNS Cache Reset

This applies for macOS High Sierra, which is versioned as Mac OS 10.13.x. Users interested in learning how to reset DNS cache in prior versions of MacOS can learn how to do so for Sierra, El Capitan, Yosemite, and earlier versions of Mac OS X if desired.

  08:35:00 pm , Categories: Macintosh OS X Tips

Verify/Repair Permission in El Capitan


The Disk Utility app has long contained the ability to verify and repair disk permissions on a Mac, but in the latest versions of OS X this ability has been removed. That doesn’t mean you can’t verify permissions and repair permissions in OS X El Capitan 10.11 and later however, you just need to turn to the command line to do so.


To be clear, verifying and repairing disk permissions has long been over assigned as a remedy to all sorts of issues on the Mac, most of which are rarely accurate or legitimate. In this sense, repairing permissions is sort of considered a form of hocuspocus with little benefit to most OS X situations, but nonetheless there are some unique circumstances where you may want to verify and repair disk permissions in OS X anyway, particularly if a files permissions are actually off, meaning the ability for certain users and processes to read and write particular files and folders.

Note this is not the same as verifying and repairing a disk.

How to Repair Verify Disk Permissions in OS X El Capitan

Open the Terminal application (found in /Applications/Utilities/) and use the following syntax to verify a volumes permissions, this will verify the default root volume of a Mac:

sudo /usr/libexec/repair_packages --verify --standard-pkgs /

If you want to verify permissions on a different drive, specify the volume rather than “/”

The command will run and either show permissions that differ, or nothing, depending on what’s found. Not surprisingly, you’ll likely find some variation of permissions that differs, looking something like:

Permissions differ on "usr/libexec/cups/cgi-bin", should be drwxr-xr-x , they are dr-xr-xr-x .
Permissions differ on "usr/libexec/cups/daemon", should be drwxr-xr-x , they are dr-xr-xr-x .
Permissions differ on "usr/libexec/cups/driver", should be drwxr-xr-x , they are dr-xr-xr-x .
Permissions differ on "usr/libexec/cups/monitor", should be drwxr-xr-x , they are dr-xr-xr-x .


How to Repair Disk Permissions in OS X El Capitan from Command Line

Assuming permissions have been found which differ and you’d like to repair them, replace the –verify flag with –repair, and again point the command at the same volume:

sudo /usr/libexec/repair_packages --repair --standard-pkgs --volume /

Repairing permissions may take a while, just like it did from Disk Utility.

If you execute the repair_packages command without sudo and with no specifications or flags, you’ll get a simple help guide instead:

$ /usr/libexec/repair_packages
Usage: repair_packages [ARGUMENTS]...

--help Print this usage guide.
--list-standard-pkgs Display the package ids in the standard set.
--verify Verify permissions on files in the specified package(s).
--repair Repair permissions on files in the specified package(s).
--pkg PKGID Verify or repair the package PKGID.
--standard-pkgs Verify or repair the standard set of packages.
--volume PATH Perform all operations on the specified volume.
--output-format # Print progress info using a special output format.
--debug Print debuging information while running.

As suggested, this is not really something that should be run on a regular basis as any part of Mac maintenance routine, and it’s rarely necessary, which is likely why Apple pulled it from the Disk Utility application.

By the way, earlier releases of OS X also have a command line approach to repairing disk permissions, but it’s handled through the Disk Utility command line tool instead.

  07:02:00 am , Categories: Fantasies Realm Market, Macintosh OS X Tips

How to Flush DNS Cache in OS X El Capitan



How to Flush DNS Cache in OS X El Capitan



If you adjust DNS settings on a Mac and the changes seemingly haven’t taken effect, or perhaps you discover that a given name server address is not resolving as intended, flushing the DNS cache is often a quick resolution.

Flushing DNS cache in OS X El Capitan (10.11 or later) is easily possible with a trip to the command line, though if you’ve been using Mac OS X for a while you’ll notice the syntax is different, again, from some prior releases of Mac OS.

This is because Apple has re-adopted mDNSResponder after temporarily ditching it for discoveryd, so the dscacheutil command will likely be familiar to some Mac users.




Flushing DNS Cache in OS X 10.11+

This method of clearing DNS cache applies to all Macs running versions of OS X El Capitan, versioned as 10.11 or later:

    1. Open the Terminal application, found in /Applications/Utilities/ or with Spotlight
    2. At the command prompt, enter the following syntax then hit return:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder; say DNS cache flushed 

  1. Enter the admin password when requested (required by sudo) to execute the DNS cache clearing
  2. When you hear “DNS Cache flushed” you know the command has been successful*


That’s it, the DNS cache will be flushed. You’ll likely want to quit and relaunch apps that are using DNS, like a web browser, for changes to carry over to apps connected to the internet.

Clearing local DNS caches is commonly required by web developers, network administrators, performing accurate detailed lookups with host, and anyone who edits the hosts file, or adjusts domain name settings for faster servers or for other purposes.

If you intend on flushing DNS caches often, a simple alias placed in your appropriate .profile can be beneficial for quick future usage:

alias flushdns='dscacheutil -flushcache;sudo killall -HUP mDNSResponder;say flushed'

Users can also cut out the say portion and split the command into several parts, though a one liner is often the easiest way to go.

sudo dscacheutil -flushcache

Then separately initiating the mDNSResponder killall command:

sudo killall -HUP mDNSResponder

Going this route will not provide any auditory feedback that the commands have been successful.

This applies to the latest versions of OS X, whereas those who are running earlier versions of Yosemite can find directions here for the same effect with a different command string, as can users of older Mac OS X releases like Mavericks and Snow Leopard, or even the dusty versions of Tiger, Panther, and Jaguar out there. On the mobile side of things, iPhone and iPad users can quickly flush DNS cache in iOS with a simple trick too.

  01:13:00 pm , Categories: Fantasies Realm Market, Macintosh OS X Tips

How to Batch Change File Extensions in Mac OS



Have you ever wanted to change a group of files file extensions in Mac OS? For example, lets say you wanted to change a bunch files with a .htm extension to .html, or a group of files from extension tie .JPEG to .PNG. We’ll show you how to easily batch change a group of file extensions on the Mac, without changing the actual file names.


Remember this is only changing the file extension, this is not actually changing the file type or performing any file conversion. We have plenty of articles about various file format and type conversions if you’re interested in that, however. This is also not changing the file names, it is only changing the extension that comes as a file suffix.

We’re going to use the same rename feature that allows batch renaming of files on the Mac but with a few slight modifications to the usage and related system preferences so that it focuses on changing the file extension rather than the file name. It’s a subtle difference but important if all you want to do is maintain file names but change the file extensions.

Batch Changing File Extensions on Mac

1.  From the Finder of the Mac, pull down the “Finder” menu and go to “Preferences” and then go to “Advanced”
2.    Check the box for “Show all filename extensions” and then uncheck the box for “Show warning before changing an extension”, then close out of Finder preferences. Turn off file extension change warning and enable show file extensions

3.    Now locate the files or folder of files that you want to change the file extensions for in the Finder and select them all, then right-click (or Control Click) and choose “Rename XX Items…”  Select all files and choose rename to change their extensions

4.    At the “Rename Finder Items” screen choose ‘Replace Text’ and then within the “Find:” section place the initial file extension, and under the “Replace with:” input place the file extension you wish to batch rename all of the selected files to, then click on “Rename”

5.    Replace one file extension with another file extension

Assuming you followed the above steps correctly, you will successfully have changed only the file extensions of the selected files, and not changed any of the names.

File extensions have been changed for all selected files

In the example above we changed a group of image files from having a “.jpeg” file extension to having a “.PNG” file extension, but you can use this with any file extension, whether it’s changing a group of files from having .docx to .doc, .txt to .php, or anything else. The extension you are choosing does not matter, though you’ll obviously want to pick one that is compatible and accurately represents the file type otherwise it may make it unreadable to some applications.

A few important points here: you must have show file extensions enabled on Mac otherwise the file extensions to change will not be visible or found by the replace tool, and secondly you must turn off the file extension change warning otherwise you will be repeatedly confronted with a dialog box to confirm the file extension has changed for each individual file extension change. Beyond that, it’s just a matter of using the batch Rename feature built-in “Find and Replace” functionality as shown.

Once you’re finished changing the group of files file extensions you are free to adjust your Finder Preferences back to whatever setting you’d like. Generally speaking it’s a good idea to leave the extension change warning enabled, however.

You could also accomplish this batch extension changing process through the command line using a variation of this trick, we’ll cover specifics for that in another article.


How to Remove Safari Extensions on Mac



Safari for Mac allows for optional third party browser extensions to be installed, performing functions like social sharing, note taking, interface with apps like 1password, amongst others. Sometimes Safari extensions can be useful, but sometimes they are no longer needed, or they can be problematic and cause freezes or trouble with Safari or for the ability to work with a specific website, and accordingly users often need to delete extensions from the browser.



This article will show you how to easily remove Safari extensions on a Mac. It’s important to note that Safari Extensions are different from Safari Plug-ins, which are removed separately.


Removing Safari Extensions on a Mac from Safari

This works to delete any Safari extension in macOS or Mac OS X:

  1. Open the Safari app and go to “Safari” menu and choose “Preferences”
  2. Go to the “Extensions” tab
  3. Click on any extension you no longer want in Safari and choose “Uninstall”
  4. Confirm that you want to delete the selected extension from Safari to remove it
  5. Repeat with other extensions as necessary

This is the easy way to delete a Safari extension, but you can also manually intervene from the file system to remove extensions from Safari as well.

Manually Deleting Safari Extension on Mac

Sometimes if an extension is causing havoc with Safari, the Extensions manager won’t be able to load or the uninstall method above won’t work. This is somewhat rare, but it can happen in some particular haywire scenarios with an errant or incompatible extension that refuses to remove itself. If this happens, you can manually delete an extension by going to where Safari extensions are located in Mac OS and removing them, this is done with the following:

1. Quit Safari on the Mac
2. From the Finder, hit Command+Shift+G to bring up Go To Folder (also accessible from the Go menu) then enter the following path:  ~/Library/Safari/Extensions/
3. Choose “Go” and you’ll instantly be in the Safari Extensions folder on the Mac, delete any extensions you wish to remove from Safari

4. Relaunch Safari when finished

 Don’t forget the tilde ~ when entering the file path to signify the users Extensions folder.

What about removing Safari Plug-ins?

As mentioned earlier, Safari Extensions are different from Safari Plug-ins. Safari Plug-ins include more functionality and tend to be feature-rich media viewers, like Adobe Acrobat reader in Safari, Adobe Flash, Silverlight, QuickTime, and similar. Without going too in-depth in this particular walkthrough, you can locate Safari plug-ins at the following file paths on a Mac:

System Level Safari plug-ins location: (available for all users):

/Library/Internet Plug-ins/

User level Safari plug-ins location: (available only for current user):

~/Library/Internet Plug-ins/

Extensions and plug-ins are often the first place to look if you are troubleshooting Safari crashes and have already updated the software and removed the cache. This is particularly true if you are experiencing Safari difficulties after updating the browser, when some plugins and extensions have not yet been updated to be compatible with the latest version. For the most part, most users don’t really need any Safari extensions or third party plug-ins, and having a simpler Safari installation often can ward off difficulties with the browser on any Mac.


FRM Designers

Fantasy Attic Sponsors