Homebrew is the package manager you wish your Mac shipped with. Once you set it up, Homebrew lets you install and update apps quickly and securely. It launched as a command-line interface, where you would type commands into the Terminal app on your Mac to install, update, or uninstall your apps. Recently, Homebrew launched its own GUI, which makes it easier than ever to use the service. Here are 10 Homebrew hacks that you should know, great for new and legacy users alike.Try Homebrew's new GUI to discover apps Credit: Pranay Parab Once you update to Homebrew version 7.0.0 or newer, you'll notice that the service has a new GUI-enabled app for your Mac. You can launch it like any other app from the Applications folder, and use the interface to discover, install, update, and remove apps. The left pane has a few tabs that allow you to keep tabs on apps you've installed via Homebrew, updates available for those apps, fixes for issues with installation, and Homebrew settings. It also has an option called "Discover," which lets you search for apps available to install via Homebrew. Just use the search bar to look for your favorite apps, and if they show up, click the "Install" button. This will download that app to your Mac, and automatically complete the installation.Check out Homebrew's "doctor" to fix software issuesHomebrew has a "doctor" feature that lets you fix issues with the service. This can be anything from unsupported or deprecated apps, to issues with the Homebrew configuration itself. You can run this from the "Doctor" tab in the Homebrew GUI, or use the following command via Terminal: brew drThe service will recommend some fixes, and you can run the suggested command in Terminal to solve the problem.Use the -q suffix to keep Terminal free of clutterWhen you're using Homebrew via Terminal, you'll quickly notice that every action leaves you with a wall of text. This is great for those who want to track all those updates, or those who are roleplaying as characters from The Matrix, but not for everyone. If you want Homebrew to do its work quietly, just add the "-q" suffix to your commands. For example:brew install firefox -qThis will minimize the number of text updates on-screen, and leave you with a much cleaner Terminal. If you'd like to see more updates, you can replace "-q" with "-v" at the end of the command.Try the "list" command to view all installed apps via Terminal Credit: Pranay Parab If you're not using Homebrew's GUI, it's easy to forget which apps you installed via Homebrew, and which ones are outside of it. To solve this, use the following command to show a list of all apps installed via Homebrew:brew listUse this command to add manually installed apps to HomebrewIf you're like me, you've probably installed some apps via Homebrew, and downloaded a few others from the developers' websites. This means you can't update all your apps in one go, since some of them are not managed by Homebrew. You can fix this issue by adopting those apps into Homebrew. Use the following command to get this done:brew install cask adopt APPNAMEAs long as the apps are supported in Homebrew, this command will adopt them into the service. You can confirm the adoption by using the "brew list" command mentioned above.Use the cleanup command to free up storage spaceWhen you install a lot of apps via Homebrew, it tends to create some clutter. Old versions of apps and cached downloads aren't always deleted immediately. If you're running short on space, you can try the following cleanup command to free up space without deleting apps:brew cleanupUse this Homebrew command to update all apps in one goThis is one of the best features in Homebrew, and it works best right after a new version of macOS is released. This is when a flurry of app updates arrives to support the new operating system, and you can try this command to update all Homebrew apps in one go:brew upgradeIn case you just want to see which apps need an update, you can try this command:brew outdatedThe upgrade command is also listed under the "Upgrades" tab in the Homebrew GUI.Use "dry run" to check which packages will be installed or updatedIf you add the "dry run" flag to any install or update command, it will reveal a list of planned updates without commencing the installation. When you're dealing with command-line interfaces, "dry run" can be a useful way to preview changes before they take place, and to ensure that the correct app is being installed or updated. This is how you can use it: What do you think so far? brew install APPNAME --dry-runSet up aliases to avoid typing long commandsIf you're tired of typing long commands in Homebrew, you can set up aliases to minimize keystrokes. For instance, you can use "brew i" instead of "brew install" to update all Homebrew apps. Use this command to set this up:brew alias i='install'Feel free to set up aliases for as many Homebrew commands as you like. The following command will list all the aliases you've set up:brew aliasTo remove an alias, use this command:brew unalias iJust remember to replace "i" with whichever alias you wish to remove.Use this command to stop specific apps from updatingIf you don't want to update to the newest versions of certain apps, you can use the "pin" command to stop updates, and then "unpin" when you are ready to update again. This can be useful when an app you trust gets acquired by new owners who have yet to prove themselves, or if it adds new features you don't want, etc. Here's how to use it:brew pin APPNAMEWhen you're ready to update it again, try this:brew unpin APPNAMENote that you may also have to disable auto-updates from the app's interface separately because some apps just update themselves without confirmation.
10 'Homebrew' Hacks Every Mac Power User Should Know
Full Article
Original Source
Read the full article at Lifehacker →KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.