How to access the opt folder on a Mac?

Finding and accessing opt isn’t as simple as finding other hidden folders. In this article, we explain why and how to find and access the opt folder.

How to find opt folder?

One of the reasons this isn’t as easy to find as Library or even Net or var is that macOS does not have an opt (or /opt) folder. Instead, macOS has a /usr/local/opt folder, which is something you can make visible in Finder.

Ordinarily, you aren't going to need to find and access the /usr/local/opt folder, unless this is something you need for downloading new software applications from third-party providers, such as Intel or Homebrew.

Whatever the format you find opt within your macOS directory, the purpose of this folder is: “a directory for installing unbundled packages (i.e. packages not part of the Operating System distribution, but provided by an independent source), each one in its own subdirectory.”

Navigating to this opt folder can be done one of two ways: either go through Terminal or search for it using Finder.

How to find opt folder using Terminal

  1. Go to Terminal - in the Utilities folder.
  2. Type in the following command: defaults write AppleShowAllFiles YES
  3. Now Reinitialize the Finder, either by rebooting or clicking the Finder while holding down the Option key, then selecting “Relaunch.”
  4. Now this should show every hidden folder, including the /usr/local/opt folder.
  5. Once you are ready to hide them again, go to Terminal and input the following command: defaults write AppleShowAllFiles NO

How to access Opt folder using the Finder

  1. Open Finder.
  2. Press Command+Shift+G to open the dialogue box.
  3. Input the following search: /usr/local/opt
  4. Now you should have temporary access, so you should be able to drag it into the Finder favourites if you want to access it again.

How to visualize all your folders with Space Lens

Space Lens one of the powerful tools in CleanMyMac X. With its help, you can scan your hard drive and build a detailed map of your storage. You'll get a list of all the files and folders on your Mac and how much space they take. In a few clicks, you can see what's taking space and remove the space hoggers for good. 

  1. Download and install CleanMyMac X.
  2. Launch the app.
  3. Choose Space Lens.
  4. Click Run.CleanMyMac X is a powerful cleaner, speed booster, and health guard for your Mac. Try it out to keep your Mac as good as new!
CleanMyMac X CleanMyMac X
CleanMyMac X

Your Mac. As good as new.