macos, linux,

How To uninstall packages with Brew including all its dependencies

Mar 07, 2022 · 1 min read · Post a comment

Homebrew, or the short version being brew is the most popular package manager for macOS. And, if you don’t know already, package managers are software tools used for managing apps on our local machines, including keeping track of versions, configuring, updating and removing them. Today we are going to learn on how to properly uninstall unused packages and all its dependencies.

Prerequisites

  • Homebrew

Solution

Step 1. List currently installed packages via Homebrew.

brew list

Step 2. List the package dependencies.

brew deps <package_name>

Step 3. Uninstall the unused package.

brew uninstall <package_name>

Step 4. Verify.

brew list | grep <package_name>

Step 5. Remove all unused dependencies.

brew autoremove

Conclusion

Official Homebrew documentation docs.brew.sh. On a side note, follow our official channel on Telegram.