10 DIY Life Hacks Every Experienced Mac User Should Know.

Homebrew is the package manager you’d expect to come with your Mac. Once installed, Homebrew allows you to quickly and safely install and update apps . Originally, it offered a command-line interface, where you entered commands into the Terminal app on your Mac to install, update, or remove apps. Recently, Homebrew released its own graphical interface, making it much easier to use. Here are 10 helpful tips for using Homebrew, useful for both beginners and experienced users.

Try Homebrew’s new GUI for finding applications.

Photo: Pranay Parab

After updating Homebrew to version 7.0.0 or later, you’ll notice that the service has a new GUI app for your Mac. You can launch it like any other app from the Applications folder and use the interface to search, install, update, and remove apps. The left panel features several tabs that let you track apps installed via Homebrew, available updates for those apps, installation fixes, and Homebrew settings. There’s also a “Search” option that lets you search for apps available for installation via Homebrew. Simply use the search bar to find your favorite apps, and if they appear, click “Install.” This will download the app to your Mac and automatically complete the installation.

Use Homebrew’s “doctor” tool to troubleshoot software problems.

Homebrew has a “Doctor” feature that allows you to fix service issues. These can range from unsupported or outdated applications to problems with the Homebrew configuration itself. You can launch it from the “Doctor” tab in the Homebrew GUI or use the following command in Terminal:

You may also like

brew dr

The service will offer several solutions, and you can run the suggested command in Terminal to fix the problem.

Use the -q suffix to keep the terminal free of unnecessary elements.

When using Homebrew through the terminal, you’ll quickly notice that every action produces a huge amount of text. This is great for those who want to keep track of all updates or for those who role-play as characters from The Matrix , but it’s not for everyone. If you want Homebrew to run silently, simply add the “-q” suffix to your commands. For example:

brew install firefox -q

This will minimize the number of text updates on the screen and significantly simplify terminal operations. If you want to see more updates, replace “-q” with “-v” at the end of the command.

Use the “list” command to view all installed applications via Terminal.

Photo: Pranay Parab

If you don’t use the Homebrew graphical interface, it’s easy to forget which applications were installed through Homebrew and which were installed outside of it. To solve this problem, use the following command to display a list of all applications installed through Homebrew:

brew list

Use this command to add manually installed applications to Homebrew.

If, like me, you installed some apps via Homebrew and downloaded others from developers’ websites, you won’t be able to update all of them at once, as some aren’t supported by Homebrew. This issue can be resolved by adding these apps to Homebrew. To do this, use the following command:

brew install cask adopt APPNAME

If applications are supported by Homebrew, this command will add them to the service. You can confirm the addition using the “brew list” command mentioned above.

Use the cleanup command to free up disk space.

Installing a large number of apps via Homebrew can often create some clutter. Old versions of apps and cached downloads aren’t always removed immediately. If you’re low on space, you can try the following cleanup command to free up space without deleting apps:

brew cleanup

Use this Homebrew command to update all applications at once.

This is one of Homebrew’s best features, and it works best right after a new macOS version is released. That’s when a ton of app updates are released to support the new operating system, and you can try this command to update all your Homebrew apps at once:

brew upgrade

If you just need to know which apps need updating, you can try this command:

brew outdated

The update command is also listed in the Updates tab of the Homebrew GUI.

Use the “test run” feature to check which packages will be installed or updated.

Adding the “dry run” flag to any install or update command displays a list of scheduled updates without starting the installation. When working with command-line interfaces, “dry run” can be a useful way to preview changes before they take effect and ensure the correct application is installed or updated. Here’s how to use it:

What do you think at the moment?

brew install APPNAME --dry-run

Set up aliases to avoid typing long commands.

If you’re tired of typing long commands in Homebrew, you can set up aliases to minimize keystrokes. For example, you can use “brew i” instead of “brew install” to update all Homebrew applications. Use this command to set this up:

brew alias i='install'

You can create aliases for any number of Homebrew commands. The following command will list all the aliases you’ve created:

brew alias

To remove an alias, use the following command:

brew unalias i

Remember to replace “i” with the nickname you want to delete.

Use this command to stop updating specific applications.

If you don’t want to update certain apps to the latest versions, you can use the “pin” command to stop updates, then “unpin” them when you’re ready to update them again. This can be useful if an app you trust is acquired by new owners who haven’t yet proven their worth, or if it adds new features you don’t need, etc. Here’s how to use it:

brew pin APPNAME

When you’re ready to update it again, try the following:

brew unpin APPNAME

Please note that you may also need to disable automatic updates separately in the app interface, as some apps update automatically without confirmation.

More…

Leave a Reply